/* Shared, quiet visual hierarchy for the administration and employee panels. */
:root {
    --blue: #316451; --blue-dark: #234e3e; --green: #527e66; --green-dark: #316451;
    --navy: #263c33; --ink: #32433b; --muted: #637168;
    --line: #dfe5de; --background: #f5f6f3; --shadow: none;
}
body { background: var(--background); line-height: 1.55; }
.app-frame { grid-template-columns: 224px minmax(0, 1fr); }
.app-sidebar, .firstmed-dialog .app-sidebar.in-sweetalert { background: #eef1eb; color: var(--ink); border-right: 1px solid var(--line); }
.sidebar-brand strong { color: var(--navy); letter-spacing: .04em; }
.sidebar-brand small { color: var(--muted); }
.sidebar-label, .nav-group-label { color: var(--muted); font-size: .7rem; letter-spacing: .04em; }
.nav-group-label { display: block; padding: 24px 14px 6px; }
.sidebar-nav a { color: #526157; min-height: 46px; }
.sidebar-nav a:hover { background: #e3e9e0; color: var(--navy); }
.sidebar-nav a[aria-current="page"] { background: #dce7db; color: #244c37; box-shadow: none; }
.sidebar-nav .app-icon { width: 19px; height: 19px; }
.sidebar-footer { border-color: var(--line); }
.sidebar-footer small { color: var(--muted); }
.sidebar-live-dot { background: #6d8d74; }
.workspace-topbar { min-height: 70px; background: #fafbf8; padding: 12px 32px; }
.workspace-account-copy strong { font-weight: 550; }
.workspace-account .avatar { background: #e6ece2; color: #3d6048; }
.account-activity { position: relative; font-size: .75rem; color: var(--muted); }
.account-activity summary { cursor: pointer; padding: 10px 0; }
.account-activity > div { position: absolute; top: 100%; right: 0; z-index: 10; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; min-width: 240px; box-shadow: 0 6px 20px #24382a12; }
.workspace-last-login { background: white; border: 0; padding: 0; }
.mode-switch { background: #edf1ea; border: 0; }
.mode-switch a[aria-current] { box-shadow: none; }
.app-frame .app-shell { max-width: 1320px; padding: 38px 36px; }
.app-frame .page-heading { margin-bottom: 30px; align-items: center; }
.app-frame .page-heading h1 { font-weight: 600; letter-spacing: -.035em; font-size: clamp(1.6rem, 2.3vw, 2.1rem); }
.app-frame .page-heading p { max-width: 620px; line-height: 1.65; }
.app-frame h2 { font-weight: 600; }
.app-frame .panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.app-frame .section-panel, .task-panel { padding: 28px; }
.app-frame .panel-description { color: var(--muted); margin: 6px 0 0; font-size: .84rem; }
.app-frame .button, .firstmed-dialog .button { font-weight: 550; border-radius: 9px; }
.app-frame .button-primary:hover { background: var(--blue-dark); }
.app-frame .button-secondary:hover { background: #f3f6ef; }
.app-frame .stats-grid { gap: 16px; }
.app-frame .stat-card { padding: 24px; border-radius: 14px; }
.app-frame .stat-card > strong { font-weight: 550; letter-spacing: -.04em; }
.app-frame th { background: #f5f7f2; color: #637168; font-size: .7rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.app-frame td { padding: 20px 14px; border-color: #edf0e9; }
.app-frame tbody tr:hover { background: #fafbf8; }
.app-frame .badge { font-weight: 500; border-radius: 6px; }
.badge-active, .badge-paid { background: #edf3e9; color: #376044; }
.badge-pending, .badge-paused { background: #f5f1e6; color: #775f30; }
.badge-expired, .badge-cancelled { background: #f0f1ee; color: #626a62; }
.page-tabs { gap: 28px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.filter-tabs a { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; color: var(--muted); font-size: .83rem; }
.filter-tabs a:hover { background: #f4f6f0; color: var(--ink); }
.filter-tabs a[aria-current] { background: #ecf2e7; border-color: #d7e3ce; color: #2e543a; font-weight: 600; }
.filter-tabs a span { font-size: .73rem; padding: 0 6px; border-radius: 4px; background: #e7ece3; }
.package-search { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.package-search .field { flex: 1; max-width: 440px; min-width: 200px; margin: 0; }
.package-search .text-button { min-height: 44px; display: inline-flex; align-items: center; }
.subscription-edit { margin-top: 8px; }
.subscription-edit summary { font-size: .76rem; color: var(--blue); cursor: pointer; }
.subscription-edit form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.subscription-edit select { max-width: 160px; }
.subscription-balance { color: #855a25; }
.app-frame .sync-stats article { border-radius: 14px; box-shadow: none; background: white; }
.app-frame .sync-stats article.attention { background: #fbf8ef; border-color: #e8dfc9; }
.app-frame .apply-panel, .app-frame .action-panel { background: #f6f8f2; box-shadow: none; }
.app-frame .membership-card { background: #eef3e8; border: 1px solid #dbe5d2; color: var(--ink); padding: 32px; border-radius: 16px; }
.membership-card::after, .membership-card::before { display: none; }
.app-frame .membership-top h2, .membership-details strong { color: var(--navy); }
.membership-top p, .membership-label, .membership-details span { color: #566e57; }
.membership-details, .membership-details > div { border-color: #d5dfcd; }
.membership-card .medicover-mark { color: #577052; opacity: .7; }
.membership-card .button-white, .membership-card .code-chip { background: white; color: var(--blue); border: 1px solid #d5dfcd; }
.app-frame .summary-icon, .task-icon, .task-icon-green { background: #edf2e8; color: #4b6d50; }
.app-frame .summary-orange { background: #f8f0e1; color: #805f2b; }
.renewal-timeline-track span { background: #688568; }
.live-dot, .sidebar-live-dot { animation: none; }
.mobile-navigation { display: none; }
.flash-wrap { max-width: 1320px; margin: 18px auto 0; padding: 0 36px; }
.flash-success, .flash-info { background: #edf4e8; border: 1px solid #d5e2cd; color: #36563c; box-shadow: none; }
:where(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #6c8965; outline-offset: 3px; }
@media (max-width: 1000px) {
    .app-frame { grid-template-columns: minmax(0, 1fr); }
    .app-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .app-frame .app-shell { padding: 28px 24px; }
    .mobile-navigation { display: flex; gap: 4px; padding: 8px 16px; background: #fafbf8; border-bottom: 1px solid var(--line); }
    .mobile-navigation a { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 1; min-height: 44px; border-radius: 8px; color: var(--muted); font-size: .78rem; }
    .mobile-navigation a[aria-current] { background: #e7eedf; color: #32533c; font-weight: 600; }
    .mobile-navigation .app-icon { width: 17px; height: 17px; }
    .app-sidebar .nav-group-label { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
    .workspace-topbar { padding: 10px 16px; align-items: center; }
    .account-activity { display: none; }
    .app-frame .app-shell { padding: 24px 16px; }
    .app-frame .section-panel, .task-panel { padding: 18px; border-radius: 12px; }
    .app-frame .page-heading { align-items: flex-start; margin-bottom: 18px; gap: 12px; }
    .mobile-navigation { padding: 8px; }
    .mobile-navigation a { flex-direction: column; gap: 3px; font-size: .71rem; padding: 5px; }
    .filter-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 18px; }
    .filter-tabs a { justify-content: space-between; padding: 9px 10px; font-size: .78rem; }
    .package-search { gap: 8px; margin-bottom: 18px; }
    .package-search .field { min-width: 0; }
    .subscription-browser .panel-head { margin-bottom: 12px; }
    .app-frame .membership-card { padding: 24px 20px; }
    .flash-wrap { padding: 0 16px; }
    .page-tabs { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
