@import url('/themes/morandi-candy-future.css');

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

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

#root {
    min-height: 100vh;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #fefae8 0%, #eee8fa 30%, #def2fc 60%, #d6f8e0 100%);
    position: relative; overflow: hidden;
    font-family: "Microsoft YaHei", "微软雅黑", var(--font-family);
}
.login-page::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(112,80,160,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112,80,160,0.06) 1px, transparent 1px);
    background-size: 60px 60px; pointer-events: none;
}
.login-page::after {
    content: ''; position: absolute; top: -150px; right: -100px;
    width: 500px; height: 500px; border-radius: 50%;
    background: #e0a0a8; filter: blur(100px); opacity: 0.4; pointer-events: none;
}

.login-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.app-layout {
    display: flex; height: 100vh; overflow: hidden;
}

.sidebar {
    width: 232px; min-width: 232px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex; flex-direction: column; height: 100vh; z-index: 20;
}
.sidebar-logo {
    padding: 20px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .navbar-logo {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
}
.sidebar-logo .brand-name {
    font-size: 19px; font-weight: 700; letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--accent-rose), var(--accent-violet));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    white-space: nowrap; line-height: 1.3;
}
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 20px; }
.nav-section-title {
    font-size: 10px; font-weight: 600; color: var(--text-light);
    letter-spacing: 2px; padding: 0 14px; margin-bottom: 10px; text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px;
    color: var(--text-secondary); cursor: pointer;
    transition: var(--transition); font-size: 13px; font-weight: 400;
    position: relative; letter-spacing: 0.2px; text-decoration: none;
}
.nav-item:hover { background: rgba(112,80,160,0.08); color: var(--text-primary); }
.nav-item.active { background: var(--accent-violet-dim); color: var(--accent-violet); font-weight: 600; }
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent-rose), var(--accent-violet));
}
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid var(--border-light); }
.user-info {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border-radius: 10px; cursor: pointer; transition: var(--transition);
}
.user-logo-circle {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-card); border: 2px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.user-logo-circle img {
    width: 24px; height: 24px; object-fit: cover;
}
.user-info:hover { background: rgba(112,80,160,0.08); }
.user-avatar {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-rose), var(--accent-violet));
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-role { font-size: 10px; color: var(--text-muted); letter-spacing: 0.5px; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    height: 65px; min-height: 65px; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card); backdrop-filter: blur(16px) saturate(1.2);
    position: sticky; top: 0; z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-info { display: flex; align-items: center; gap: 12px; margin-right: 8px; }
.topbar-date, .topbar-time { font-size: 13px; color: #555555; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.3px; }
.topbar-btn {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; cursor: pointer; transition: var(--transition);
    color: var(--text-secondary); position: relative; background: none; border: none; font-size: 14px;
}
.topbar-btn:hover { background: var(--accent-violet-dim); color: var(--accent-violet); }
.topbar-btn .dot {
    position: absolute; top: 7px; right: 7px; width: 5px; height: 5px;
    background: var(--accent-terra); border-radius: 50%;
}

.page-content { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg-primary); }

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

.card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius); padding: 22px; transition: var(--transition);
    box-shadow: var(--shadow-xs); backdrop-filter: blur(12px) saturate(1.06);
    margin-bottom: 20px;
}
.card:hover { box-shadow: var(--shadow-sm); }

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); margin-top: 0; font-weight: 600; }
.card h2 { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: 0.2px; margin-bottom: 18px; }

button, .btn {
    padding: 9px 18px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 500; font-family: inherit;
    cursor: pointer; transition: var(--transition); border: none;
    display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.3px;
    text-decoration: none; text-align: center;
}
.btn-ghost { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--accent-violet); color: var(--accent-violet); }
.btn-accent, .btn-primary { background: linear-gradient(135deg, var(--accent-rose), var(--accent-violet)); color: #fff; border: none; }
.btn-accent:hover, .btn-primary:hover { box-shadow: var(--shadow-glow-violet); transform: translateY(-1px); }
.btn-accent:active, .btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); }
.btn-secondary:hover { border-color: var(--accent-violet); color: var(--accent-violet); }
.btn-cancel { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); }
.btn-cancel:hover { border-color: var(--accent-violet); color: var(--accent-violet); }
.btn-sage { background: var(--accent-sage-dim); color: var(--accent-sage); border: 1px solid rgba(56,144,88,0.18); }
.btn-sm { padding: 5px 12px; font-size: 11px; border-radius: 8px; }
.btn-danger { background: var(--accent-terra-dim); color: var(--accent-terra); border: 1px solid rgba(176,56,40,0.18); }
.btn-danger:hover { background: var(--accent-terra); color: #fff; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.5px; }

input, select, textarea {
    width: 100%; padding: 13px 16px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: 12px; color: var(--text-primary);
    font-size: 14px; font-family: inherit; transition: var(--transition); outline: none;
    backdrop-filter: blur(8px);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-violet); box-shadow: 0 0 0 3px var(--accent-violet-dim), var(--shadow-sm); background: var(--bg-card); }
input::placeholder, textarea::placeholder { color: var(--text-light); }

table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th { text-align: left; padding: 11px 14px; font-size: 11px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border-light); background: var(--bg-input); letter-spacing: 0.5px; }
td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid var(--border-light); }
tr:hover td { background: var(--accent-violet-bg); }

.error { color: var(--accent-terra); margin-bottom: 15px; padding: 12px; background: var(--accent-terra-bg); border-left: 3px solid var(--accent-terra); border-radius: var(--radius-sm); font-size: 13px; }
.success { color: var(--accent-sage); margin-bottom: 15px; padding: 12px; background: var(--accent-sage-bg); border-left: 3px solid var(--accent-sage); border-radius: var(--radius-sm); font-size: 13px; }

.login-container {
    position: relative; z-index: 10; width: 90%; max-width: 400px;
    padding: 32px 28px;
    background: rgba(252,251,247,0.96); backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(245,242,236,0.6); border-radius: 28px;
    box-shadow: var(--shadow-xl), 0 0 80px rgba(112,80,160,0.10);
    text-align: center;
}
.title { text-align: center; margin-bottom: 28px; }
.title h1 {
    font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-rose), var(--accent-violet), var(--accent-slate));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin: 0 0 10px 0;
}
.title h2 {
    margin: 0; font-size: 15px; color: var(--text-secondary);
    font-weight: 500; letter-spacing: 4px;
}
.login-container .form-group { text-align: left; margin-bottom: 20px; }
.login-container label { font-size: 14px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.5px; }
.login-container input { border-radius: 12px; padding: 13px 16px; }

.login-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--accent-rose), var(--accent-violet));
    border: none; border-radius: 12px;
    color: #fff; font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: var(--transition); margin-top: 8px; letter-spacing: 2px;
    text-align: center; display: block; text-decoration: none;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow-violet); }

.login-footer-section {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center;
    z-index: 1;
}
.login-footer-section img { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 8px; display: block; }
.login-footer-section .copyright { font-size: 11px; color: var(--text-muted); text-align: center; }

.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; color: var(--text-primary); margin: 0; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 300; letter-spacing: 0.3px; }
.page-actions { display: flex; gap: 8px; }

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: 0.2px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border-light); background: var(--bg-input); letter-spacing: 0.5px; }
.data-table td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.data-table tr:hover td { background: var(--accent-violet-bg); }
.data-table .no-hover-row:hover,
.data-table .no-hover-row:hover td,
.data-table .no-hover-cell:hover {
    background: inherit !important;
    background-color: inherit !important;
}

.split-meal-table th,
.split-meal-table td {
    font-size: inherit !important;
}

.order-summary-table th { font-size: 14px !important; }
.order-summary-table td { font-size: 14px !important; }

.mono { font-family: 'Courier New', monospace; font-size: 12px; }

.stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius); padding: 22px;
    position: relative; overflow: hidden; transition: var(--transition);
    box-shadow: var(--shadow-xs); backdrop-filter: blur(12px) saturate(1.06); text-align: center;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent-violet), var(--accent-violet-light)); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card h3 { margin: 0 0 10px 0; color: var(--accent-violet); font-size: 16px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); }

.about-admin-layout {
    display: flex; flex-direction: column; align-items: center;
    min-height: calc(100vh - 65px - 48px);
    text-align: center;
}
.about-top {
    width: 100%; padding-top: 40px; text-align: center;
}
.about-top .system-name { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; margin-bottom: 8px; margin-top: 20px; }
.about-top .system-name-en { font-size: 14px; color: #666666; letter-spacing: 2px; font-weight: 300; }
.about-middle {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%;
}
.about-middle .management-platform { font-size: 18px; color: #666666; font-weight: 500; }
.about-mobile-middle {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 20px 0;
}
.about-mobile-middle .logo-container img { width: 160px; height: 160px; border-radius: 24px; opacity: 0.6; }
.about-mobile-bottom {
    width: 100%; text-align: center; padding-bottom: 40px;
}
.about-mobile-bottom .version-info { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.about-mobile-bottom .version-info p { margin: 4px 0; }
.about-mobile-bottom .copyright { font-size: 12px; color: var(--text-muted); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 20px; }
.pagination a { padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); text-decoration: none; color: var(--text-secondary); font-size: 12px; }
.pagination a:hover { border-color: var(--accent-violet); color: var(--accent-violet); }
.pagination .active { background: linear-gradient(135deg, var(--accent-rose), var(--accent-violet)); color: #fff; border-color: transparent; }

.user-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.user-management-table { width: 100%; border-collapse: collapse; }
.user-management-table .col-actions { width: 200px; }
.user-management-table .td-nowrap { white-space: nowrap; }
.user-management-table .td-nowrap .btn { margin-right: 4px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.search-form { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-xs); margin-bottom: 20px; }
.search-form .form-row { display: flex; gap: 10px; margin-bottom: 15px; }
.search-form .form-group { flex: 1; margin-bottom: 0; }
.search-form .form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* 订餐汇总查询页面 */
.order-summary-query-row { display: flex; align-items: center; gap: 12px; }
.order-summary-query-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.order-summary-query-input {
    width: 180px; padding: 10px 14px; font-size: 13px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); color: var(--text-primary);
    outline: none; transition: border-color .2s;
}
.order-summary-query-input:focus { border-color: var(--accent-violet); box-shadow: 0 0 0 3px var(--accent-violet-dim); }

.order-summary-tabs { display: flex; gap: 12px; margin: 16px 0 20px 0; flex-wrap: wrap; }
.order-summary-tab-btn {
    padding: 10px 22px; border-radius: 14px; cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500; font-family: inherit;
    transition: all .2s;
}
.order-summary-tab-btn.active {
    border: 2px solid var(--accent-violet);
    color: var(--accent-violet);
    font-size: 15px;
    font-weight: 600;
    background: var(--accent-violet-dim);
    padding: 9px 21px;
}

.order-summary-table th { font-size: 14px !important; }
.order-summary-table td { font-size: 14px !important; }

@media (max-width: 768px) {
    .sidebar { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .page-content { padding: 12px; }
    .card { padding: 16px; }
    button, .btn { padding: 8px 14px; font-size: 12px; }
    th, td { padding: 8px 10px; font-size: 12px; }
}