:root {
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --topnav-h: 58px;
    --topnav-fs: 12.8px;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.25);
    --lms: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #dc2626;
    --info: #2563eb;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.1);
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 18px;
    --page-pad-x: 1.25rem;
    --page-pad-y: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

body.app-body {
    margin: 0;
    font-family: var(--font);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--page-pad-y) var(--page-pad-x) 0.75rem;
}

.site-footer {
    flex-shrink: 0;
    margin: 0;
    padding: 0.4rem var(--page-pad-x) 0.35rem;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }

/* —— Topnav (LMS-matched) —— */
.topnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--topnav-h);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 1rem;
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(8px);
}

.topnav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 0.5rem;
    min-width: 44px;
}

.topnav-brand-mobile { display: none; }

.topnav-logo {
    width: auto;
    min-width: 38px;
    height: 30px;
    padding: 0 5px;
    background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 52%, #2563eb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--topnav-fs);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.topnav-menu {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 0.25rem;
}
.topnav-menu::-webkit-scrollbar { display: none; }

.topnav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.35rem;
    flex-shrink: 0;
}

.topnav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}
.topnav-item i { font-size: 1.05rem; }
.topnav-item:hover,
.topnav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
.topnav-item-box {
    border: 1px solid var(--border);
    background: #fff;
}
.topnav-item-box:hover,
.topnav-item-box.active {
    border-color: #c7d2fe;
    background: var(--primary-light);
    color: var(--primary);
}

.topnav-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
}

.sop-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: var(--primary-light);
    border: 1px solid #c7d2fe;
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}
.sop-user-chip--ghost {
    background: #fff;
    border-color: var(--border);
    color: var(--text-secondary);
}
.sop-user-chip:hover { color: var(--primary); }

/* LMS-matching account menu */
.lms-user-menu {
    position: relative;
    z-index: 40;
}
.lms-user-menu.is-open { z-index: 10061; }
.lms-user-menu-trigger {
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 6px 4px 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--text);
    cursor: pointer;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
    outline: none;
}
.lms-user-menu-trigger:hover,
.lms-user-menu.is-open .lms-user-menu-trigger {
    background: rgba(255, 255, 255, 0.72);
}
.lms-user-menu-trigger:focus-visible {
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35);
}
.lms-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(145deg, #7c3aed, #6366f1);
    color: #fff;
    font-weight: 800;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.22);
}
.lms-user-menu-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}
.lms-user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #dbe3f1;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    z-index: 10060;
    display: none;
}
.lms-user-menu.is-open .lms-user-dropdown { display: block; }
.lms-user-dropdown[hidden] { display: none !important; }
.lms-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4338ca;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.lms-user-dropdown-item:last-child { border-bottom: 0; }
.lms-user-dropdown-item i {
    font-size: 1rem;
    color: #6366f1;
    flex-shrink: 0;
}
.lms-user-dropdown-item:hover { background: #f8fafc; }
.lms-user-dropdown-item--profile { cursor: default; font-weight: 700; }
.lms-user-dropdown-item--profile:hover { background: transparent; }
.lms-user-dropdown-item--profile:disabled { opacity: 1; }
.lms-user-dropdown-item--logout {
    color: #c2410c;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    margin-top: 2px;
    padding-top: 12px;
}
.lms-user-dropdown-item--logout:hover {
    background: #fff7ed;
    color: #c2410c;
}

.mobile-sidebar-user-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    font: inherit;
    cursor: pointer;
    text-align: left;
    margin-bottom: 0.5rem;
}
.mobile-sidebar-user-toggle.is-open {
    background: #fff;
    border-color: #c7d2fe;
}
.mobile-sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-sidebar-user-chev {
    color: var(--text-muted);
    transition: transform 0.18s ease;
}
.mobile-sidebar-user-toggle.is-open .mobile-sidebar-user-chev {
    transform: rotate(180deg);
    color: var(--lms);
}
.mobile-sidebar-user-drop {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-sidebar-user-drop[hidden] { display: none !important; }

.lms-toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 13000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.lms-toast {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: #0f172a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: min(360px, calc(100vw - 2rem));
}
.lms-toast.is-visible { opacity: 1; transform: translateY(0); }
.lms-toast--success { background: linear-gradient(135deg, #059669, #10b981); }
.lms-toast--info { background: linear-gradient(135deg, #4338ca, #6366f1); }
.lms-toast--error { background: linear-gradient(135deg, #b91c1c, #dc2626); }

.sop-pin-row {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 0.85rem;
}
.sop-pin-box {
    width: 2.55rem;
    height: 2.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0;
}
.sop-pin-box.filled,
.sop-pin-box:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    outline: none;
}
.sop-login-switch {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.topnav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.topnav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
body.nav-open .topnav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .topnav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .topnav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
body.nav-open .mobile-drawer-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.14);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
}
body.nav-open .mobile-sidebar {
    transform: translateX(0);
    visibility: visible;
}
body.nav-open { overflow: hidden; }

.mobile-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.mobile-sidebar-brand { display: flex; align-items: center; text-decoration: none; }
.mobile-sidebar-portal-switch { padding: 0.65rem 0.75rem 0.25rem; }
.mobile-sidebar-portal-switch .lw-portal-switch { width: 100%; justify-content: center; }
.mobile-sidebar-portal-switch .lw-portal-switch-btn { flex: 1 1 0; }
.mobile-sidebar-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
}
.mobile-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 600;
}
.mobile-nav-item i { font-size: 1.15rem; width: 1.35rem; text-align: center; }
.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
.mobile-sidebar-foot {
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}
.mobile-nav-app,
.mobile-nav-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
}
.mobile-nav-app {
    background: #fff;
    border: 1px solid #c7d2fe;
    color: var(--primary);
}
.mobile-nav-logout {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.mobile-nav-logout:hover {
    color: var(--danger);
    border-color: #fecaca;
    background: #fef2f2;
}

@media (max-width: 992px) {
    .topnav-toggle { display: flex; }
    .topnav-brand-desktop,
    .topnav-menu-desktop { display: none !important; }
    .topnav-brand-mobile {
        display: flex;
        flex: 1;
        min-width: 0;
        margin-right: 0.35rem;
    }
    .topnav { padding: 0 0.75rem; }
    .app-content {
        --page-pad-x: 0.75rem;
        --page-pad-y: 0.85rem;
    }
    .sop-user-chip span { display: none; }
    .lms-user-menu-name {
        max-width: 72px;
        font-size: 0.75rem;
    }
    .mobile-sidebar-head .topnav-logo {
        min-width: 36px;
        height: 30px;
        font-size: var(--topnav-fs);
    }
}
@media (min-width: 993px) {
    .topnav-toggle { display: none !important; }
    .topnav-brand-mobile { display: none !important; }
    .mobile-sidebar-portal-switch,
    .mobile-sidebar,
    .mobile-drawer-overlay { display: none !important; }
}
@media (max-width: 480px) {
    .app-content { --page-pad-x: 0.6rem; }
}

/* —— Content —— */
.sop-flash {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    border: 1px solid #c7d2fe;
    font-size: 0.9rem;
}
.sop-flash--error { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.sop-flash--ok { background: var(--primary-light); }

.sop-hero {
    display: grid;
    gap: 0.85rem;
    padding: 1.15rem 1.2rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.14), transparent 42%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.sop-hero h1 {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.sop-hero p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 48rem;
    font-size: 0.9rem;
}

.sop-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}
.sop-stat {
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border);
}
.sop-stat strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}
.sop-stat span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sop-search-bar {
    display: flex;
    gap: 0.45rem;
    width: 100%;
    max-width: 560px;
}
.sop-search-bar input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    font: inherit;
    background: #fff;
}
.sop-search-bar input:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.sop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.95rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px var(--primary-glow);
    white-space: nowrap;
}
.sop-btn:hover { color: #fff; filter: brightness(1.03); }
.sop-btn--ghost {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}
.sop-btn--ghost:hover { border-color: #c7d2fe; color: var(--primary); background: var(--primary-light); }
.sop-btn--danger { background: var(--danger); box-shadow: none; }
.sop-btn--sm { padding: 0.4rem 0.65rem; font-size: 0.78rem; }

.sop-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.65rem;
}
.sop-section-label h2 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
}
.sop-muted { color: var(--text-secondary); font-size: 0.88rem; }

.sop-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}
.sop-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}
.sop-chip:hover {
    border-color: #c7d2fe;
    background: var(--primary-light);
    color: var(--primary);
}
.sop-chip i { color: var(--primary); }
.sop-recent-empty { margin: 0; }

.sop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}
@media (min-width: 992px) {
    .sop-layout--home {
        grid-template-columns: minmax(0, 1fr) 260px;
        align-items: start;
    }
    .sop-layout--service {
        grid-template-columns: 200px minmax(0, 1fr);
        align-items: start;
    }
}

.sop-side {
    position: sticky;
    top: calc(var(--topnav-h) + 0.75rem);
    display: grid;
    gap: 0.75rem;
}
.sop-side-card {
    padding: 0.85rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.sop-side-card h3 {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.sop-side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.sop-side-nav a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}
.sop-side-nav a:hover,
.sop-side-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
}
.sop-grid--dense {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.sop-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.95rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    min-width: 0;
}
a.sop-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: var(--shadow-sm);
    color: inherit;
}
.sop-card-icon {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.05rem;
}
.sop-card h2,
.sop-card h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.25;
}
.sop-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sop-card .meta {
    margin-top: auto;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.sop-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.sop-breadcrumb a { color: var(--text-muted); }
.sop-breadcrumb strong { color: var(--text); font-weight: 700; }

.sop-service-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.sop-service-head h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.sop-service-head p { margin: 0; color: var(--text-secondary); font-size: 0.88rem; }
.sop-service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sop-block {
    margin-bottom: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.sop-block--heading {
    padding: 0.2rem 0;
    background: transparent;
    border: 0;
    margin-bottom: 0.35rem;
}
.sop-block-heading {
    margin: 0.35rem 0 0.15rem;
    font-size: 1.15rem;
    font-weight: 800;
}
.sop-block-title {
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    font-weight: 750;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.sop-block-body { color: var(--text-secondary); line-height: 1.55; font-size: 0.9rem; }

.sop-process {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}
.sop-process li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    border-radius: 9px;
    background: var(--surface-2);
    font-size: 0.88rem;
    line-height: 1.4;
}
.sop-process-num {
    flex: 0 0 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.sop-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.88rem;
}

.sop-note {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 9px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.sop-note i { color: var(--warning); font-size: 1.05rem; margin-top: 0.1rem; }
.sop-note p { margin: 0.2rem 0 0; color: var(--text-secondary); font-size: 0.88rem; }

.sop-link-card {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.8rem 0.9rem;
    border-radius: 9px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: inherit;
}
.sop-link-card:hover { border-color: #93c5fd; color: inherit; }
.sop-link-card i { color: var(--info); font-size: 1.1rem; margin-top: 0.1rem; }
.sop-link-card span { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.sop-link-card small { color: var(--text-secondary); font-size: 0.8rem; }
.sop-link-card em {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sop-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}
.sop-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sop-empty {
    padding: 1.75rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.8);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.sop-login-wrap {
    width: min(400px, 100%);
    margin: 2rem auto;
    padding: 1.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.sop-login-wrap .brand-mark {
    width: auto;
    min-width: 46px;
    height: 42px;
    padding: 0 6px;
    margin: 0 auto 0.85rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.8px;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}
.sop-login-wrap h1 {
    margin: 0 0 0.3rem;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
}
.sop-login-wrap p { margin: 0 0 1rem; color: var(--text-secondary); text-align: center; font-size: 0.88rem; }
.sop-login-wrap input {
    width: 100%;
    margin-bottom: 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    font: inherit;
    letter-spacing: 0.2em;
    text-align: center;
}

.sop-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}
.sop-table-wrap {
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}
.sop-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 560px;
}
.sop-table th,
.sop-table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.sop-table th {
    background: var(--surface-2);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.sop-form {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 720px;
}
.sop-form label {
    display: grid;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
}
.sop-form input,
.sop-form select,
.sop-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-weight: 400;
}
.sop-form textarea { min-height: 120px; resize: vertical; }
.sop-form-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.sop-help { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }
.sop-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; }

@media (max-width: 720px) {
    .sop-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sop-layout--home,
    .sop-layout--service { grid-template-columns: 1fr; }
    .sop-side { position: static; }
    .sop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .sop-hero { padding: 0.95rem; }
}

@media print {
    .topnav,
    .site-footer,
    .mobile-sidebar,
    .mobile-drawer-overlay,
    .sop-service-actions,
    .sop-side,
    .lw-portal-switch { display: none !important; }
    .app-content { padding: 0; }
    .sop-block { break-inside: avoid; box-shadow: none; }
}
