* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #1890ff;
}

a:hover {
    color: #40a9ff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn:hover {
    background: #40a9ff;
}

.btn-primary {
    background: #1890ff;
}

.btn-success {
    background: #52c41a;
}

.btn-danger {
    background: #ff4d4f;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.alert-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border-right: 1px solid #f0f0f0;
}

.admin-sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    background: #fff;
}

.sidebar-header img {
    max-width: 160px;
    max-height: 45px;
    object-fit: contain;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.sidebar-menu li {
    margin: 0;
}

.menu-group {
    margin-bottom: 8px;
}

.menu-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.menu-group-title:hover {
    color: #1890ff;
    background: rgba(24, 144, 255, 0.04);
}

.menu-group-title .arrow {
    transition: transform 0.3s;
    font-size: 10px;
    color: #999;
}

.menu-group-title.collapsed .arrow {
    transform: rotate(-90deg);
}

.menu-group-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-group-content.collapsed {
    max-height: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 11px 20px 11px 28px;
    color: #4a4a4a;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
    position: relative;
}

.sidebar-menu a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d9d9d9;
    margin-right: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sidebar-menu a:hover {
    background: rgba(24, 144, 255, 0.06);
    color: #1890ff;
    border-left-color: rgba(24, 144, 255, 0.3);
}

.sidebar-menu a:hover::before {
    background: #1890ff;
}

.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.08) 0%, transparent 100%);
    color: #1890ff;
    border-left-color: #1890ff;
    font-weight: 500;
}

.sidebar-menu a.active::before {
    background: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

.sidebar-toggle {
    position: fixed;
    left: 260px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 64px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
}

.sidebar-toggle:hover {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
    box-shadow: 2px 0 12px rgba(24, 144, 255, 0.3);
}

.sidebar-toggle.shifted {
    left: 0;
}

.sidebar-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.sidebar-toggle.shifted svg {
    transform: rotate(180deg);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-main.expanded {
    margin-left: 0;
}

.admin-header {
    background: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.admin-content {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Frontend Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 15px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 50px;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.site-nav a {
    color: #333;
    font-weight: 500;
}

.site-nav a:hover {
    color: #1890ff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Features */
.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 40px 30px;
}

.feature-item h3 {
    margin: 20px 0 10px;
    font-size: 20px;
}

.feature-item p {
    color: #666;
}

/* Footer */
.site-footer {
    background: #fff;
    padding: 40px 0;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.footer-info p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.footer-record {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
}

.footer-record-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(24, 144, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h1 {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.login-header p {
    color: #999;
    font-size: 14px;
}

.login-box .form-group {
    margin-bottom: 24px;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.login-box .form-group input[type="text"],
.login-box .form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fafafa;
}

.login-box .form-group input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
    background: #fff;
}

.login-btn {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 8px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.login-footer a {
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #1890ff;
}

/* Install */
.install-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.install-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    max-width: 600px;
    width: 100%;
}

.install-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-size: 26px;
    font-weight: 600;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    font-weight: 600;
}

.step.active {
    background: #1890ff;
    color: #fff;
}

.step.done {
    background: #52c41a;
    color: #fff;
}

/* Logo Preview */
.logo-preview {
    margin-top: 10px;
}

.logo-preview img {
    max-width: 200px;
    max-height: 80px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 5px;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #fafafa;
    font-weight: 600;
}

.table tr:hover {
    background: #fafafa;
}
