/* 관리자 시스템 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --admin-header-height: 60px;
    --admin-sidebar-width: 280px;
    --admin-sidebar-width-min: 240px;
    --admin-sidebar-width-max: 420px;
    --admin-sidebar-handle-width: 18px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

body.admin-auth-pending .admin-container {
    visibility: hidden;
}

body.admin-auth-pending::before {
    content: "관리자 인증 상태를 확인하는 중입니다.";
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f5f7fb;
    color: #334155;
    font-size: 16px;
    font-weight: 700;
}

/* 로그인 페이지 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

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

.login-box .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-box .btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.login-box .btn-info:hover {
    background-color: #138496;
}

.login-box .btn-info:active {
    background-color: #117a8b;
}

.login-box .btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box .btn-primary:hover {
    background: #5568d3;
}

.login-box .error-message {
    margin-top: 15px;
    padding: 10px;
    background: #fee;
    color: #c33;
    border-radius: 5px;
    text-align: center;
}

/* 관리자 대시보드 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--admin-header-height);
    background: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.admin-header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    height: 100%;
    padding: 0 8px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
    color: white;
    text-decoration: none;
}

.admin-logo-image {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain !important;
    display: block;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(191, 219, 254, 0.28);
    border-radius: 13px;
    background: linear-gradient(135deg, #07152f 0%, #0f2747 100%);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 이미지가 컨테이너를 벗어나지 않도록 강제 */
.admin-logo-image[src] {
    max-width: 40px !important;
    max-height: 40px !important;
}

/* 이미지가 없거나 로드 실패 시 숨김 */
.admin-logo-image:not([src]),
.admin-logo-image[src=""],
.admin-logo-image[src*="undefined"],
.admin-logo-image[src*="null"] {
    display: none !important;
}

.admin-header-brand-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    line-height: 1;
}

.admin-header-brand-copy strong {
    color: #f8fafc;
    font-family: 'Segoe UI', 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.admin-header-brand-copy span {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-brand-fallback-text {
    display: none;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
}

.admin-header-logo.logo-fallback .admin-header-brand-copy {
    display: none;
}

.admin-header-logo.logo-fallback .admin-brand-fallback-text {
    display: inline-block;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .admin-header-logo {
        width: 190px;
        min-width: 190px;
        max-width: 190px;
        gap: 9px;
    }
    
    .admin-logo-image {
        width: 34px !important;
        height: 34px !important;
        border-radius: 11px;
    }
    
    .admin-logo-image[src] {
        max-width: 34px !important;
        max-height: 34px !important;
    }

    .admin-header-brand-copy strong,
    .admin-brand-fallback-text {
        font-size: 15px;
    }

    .admin-header-brand-copy span {
        font-size: 9px;
    }
}

.admin-header h1 {
    font-size: 20px;
    margin: 0;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-sidebar {
    position: fixed;
    left: 0;
    top: var(--admin-header-height);
    width: var(--admin-sidebar-width);
    height: calc(100vh - var(--admin-header-height));
    background: #34495e;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: visible;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar > ul {
    list-style: none;
    margin: 0;
    padding: 0 10px 24px 0;
}

.admin-sidebar li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.admin-sidebar li a:hover,
.admin-sidebar li a.active {
    background: #2c3e50;
}

/* 메뉴 섹션 스타일 */
.admin-sidebar .menu-section {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .menu-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.admin-sidebar .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #ecf0f1;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    cursor: pointer;
}

.admin-sidebar .section-title:hover {
    background: rgba(44, 62, 80, 0.55);
}

.admin-sidebar .menu-section.is-open > .section-title,
.admin-sidebar .menu-section.is-active > .section-title {
    background: rgba(44, 62, 80, 0.8);
}

.admin-sidebar .section-title-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
}

.admin-sidebar .section-title-text .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 2px 7px;
    background: rgba(148, 163, 184, 0.24);
    color: #e5e7eb;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.admin-sidebar .section-arrow {
    margin-left: auto;
    font-size: 12px;
    color: #bdc3c7;
    transition: transform 0.2s ease;
}

.admin-sidebar .menu-section.is-open > .section-title .section-arrow {
    transform: rotate(180deg);
}

.admin-sidebar .submenu {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
}

.admin-sidebar .submenu[hidden] {
    display: none;
}

.admin-sidebar .submenu li a {
    padding: 12px 20px 12px 40px;
    font-size: 14px;
    color: #bdc3c7;
}

.admin-sidebar .submenu li a:hover,
.admin-sidebar .submenu li a.active {
    background: #2c3e50;
    color: white;
}

/* OCR 운영 보조 섹션 강조 */
.admin-sidebar .ocr-section {
    border-left: 3px solid #38bdf8;
    background-color: rgba(14, 165, 233, 0.1);
}

.admin-sidebar .ocr-section .section-title {
    color: #e0f2fe;
}

.admin-sidebar .ocr-section .section-title-text .badge {
    background-color: #0ea5e9;
    color: white;
}

.admin-sidebar .ocr-section .submenu li a {
    color: #d7ecfb;
}

.admin-sidebar .ocr-section .submenu li a:hover,
.admin-sidebar .ocr-section .submenu li a.active {
    background: rgba(14, 165, 233, 0.22);
    color: white;
}

/* 연구 관리 섹션 강조 */
.admin-sidebar .research-section {
    border-left: 3px solid #667eea;
    background-color: rgba(102, 126, 234, 0.1);
    margin-top: 20px;
    padding-top: 10px;
}

.admin-sidebar .research-section .section-title {
    color: #667eea;
    font-weight: 600;
}

.admin-sidebar .research-section .section-title-text .badge {
    display: inline-block;
    background-color: #667eea;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    text-transform: none;
    letter-spacing: 0;
}

.admin-sidebar .research-section .submenu li a {
    color: #d1d9e6;
}

.admin-sidebar .research-section .submenu li a:hover,
.admin-sidebar .research-section .submenu li a.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
}

.admin-sidebar-resizer {
    position: absolute;
    top: 0;
    right: calc(var(--admin-sidebar-handle-width) / -2);
    width: var(--admin-sidebar-handle-width);
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: col-resize;
    z-index: 5;
}

.admin-sidebar-resizer::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: rgba(148, 163, 184, 0.35);
    transition: background-color 0.2s ease;
}

.admin-sidebar-resizer-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 84px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, rgba(203, 213, 225, 0.9), rgba(148, 163, 184, 0.8));
    box-shadow: 0 0 0 4px rgba(52, 73, 94, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-sidebar:hover .admin-sidebar-resizer-grip,
.admin-sidebar-resizer:hover .admin-sidebar-resizer-grip,
body.admin-sidebar-resizing .admin-sidebar-resizer-grip {
    opacity: 1;
}

.admin-sidebar-resizer:hover::before,
body.admin-sidebar-resizing .admin-sidebar-resizer::before {
    background: rgba(96, 165, 250, 0.9);
}

.admin-content {
    margin-left: var(--admin-sidebar-width);
    margin-top: var(--admin-header-height);
    padding: 30px;
    width: calc(100% - var(--admin-sidebar-width));
    min-width: 0;
    transition: margin-left 0.16s ease, width 0.16s ease;
}

.admin-content > * {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.admin-content h2 {
    margin-bottom: 20px;
    color: #333;
}

body.admin-sidebar-resizing {
    cursor: col-resize;
}

/* Generic admin dialog */
.admin-dialog-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.admin-dialog-modal.show {
    opacity: 1;
    visibility: visible;
}

.admin-dialog-content {
    width: min(92vw, 540px);
    max-height: 90vh;
    overflow: auto;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    border: 1px solid #dbe4f0;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.18s ease;
}

.admin-dialog-modal.show .admin-dialog-content {
    transform: translateY(0) scale(1);
}

.admin-dialog-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5edf6;
}

.admin-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.admin-dialog-body {
    padding: 20px 22px;
}

.admin-dialog-body p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.7;
}

.admin-dialog-detail {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5edf6;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
    white-space: normal;
    word-break: break-word;
}

.admin-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 22px 22px;
    border-top: 1px solid #e5edf6;
}

.admin-dialog-footer .btn {
    min-width: 104px;
    min-height: 42px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-dialog-footer .btn-light {
    background: #eef2f7;
    color: #334155;
}

.admin-dialog-footer .btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.admin-dialog-tone-danger .admin-dialog-header {
    background: #fff1f2;
}

.admin-dialog-tone-danger .admin-dialog-header h3 {
    color: #b91c1c;
}

.admin-dialog-tone-warning .admin-dialog-header {
    background: #fff7ed;
}

.admin-dialog-tone-warning .admin-dialog-header h3 {
    color: #b45309;
}

.admin-dialog-tone-success .admin-dialog-header {
    background: #ecfdf5;
}

.admin-dialog-tone-success .admin-dialog-header h3 {
    color: #15803d;
}

.admin-dialog-tone-info .admin-dialog-header {
    background: #eff6ff;
}

.admin-dialog-tone-info .admin-dialog-header h3 {
    color: #1d4ed8;
}

/* Rate Limit 모달 */
.rate-limit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rate-limit-modal.show {
    opacity: 1;
    visibility: visible;
}

.rate-limit-modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.rate-limit-modal.show .rate-limit-modal-content {
    transform: scale(1);
}

.rate-limit-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff3cd;
    border-radius: 10px 10px 0 0;
}

.rate-limit-modal-header h3 {
    margin: 0;
    color: #856404;
    font-size: 20px;
    font-weight: 600;
}

.rate-limit-modal-body {
    padding: 25px;
}

.rate-limit-modal-body p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.rate-limit-info {
    color: #666 !important;
    font-size: 14px !important;
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.rate-limit-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.rate-limit-modal-footer .btn {
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rate-limit-modal-footer .btn-primary {
    background: #667eea;
    color: white;
}

.rate-limit-modal-footer .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.rate-limit-modal-footer .btn-primary:active {
    transform: translateY(0);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .admin-dialog-content {
        width: 95vw;
    }

    .admin-dialog-footer {
        flex-direction: column-reverse;
    }

    .admin-dialog-footer .btn {
        width: 100%;
    }

    .rate-limit-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .rate-limit-modal-header {
        padding: 15px 20px;
    }
    
    .rate-limit-modal-header h3 {
        font-size: 18px;
    }
    
    .rate-limit-modal-body {
        padding: 20px;
    }
    
    .rate-limit-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .rate-limit-modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 1023px) {
    .admin-sidebar {
        width: 100%;
        max-width: none;
        position: static;
        height: auto;
        overflow: visible;
        box-shadow: none;
        border-right: none;
    }

    .admin-sidebar ul {
        padding-right: 0;
    }

    .admin-sidebar-resizer {
        display: none;
    }

    .admin-content {
        margin-left: 0;
        width: 100%;
    }
}

.admin-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    gap: 22px;
    padding: 26px 28px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #38bdf8 100%);
    color: #f8fafc;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.admin-home-hero-copy {
    min-width: 0;
}

.admin-home-eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.95);
}

.admin-home-hero h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.15;
}

.admin-home-description {
    max-width: 680px;
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.96);
}

.admin-home-statusboard {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.admin-home-statuscard {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.3);
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(10px);
}

.admin-home-statuslabel {
    color: rgba(191, 219, 254, 0.95);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.admin-home-statuscard strong {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.3;
}

.admin-home-statuscard p {
    margin: 0;
    color: rgba(226, 232, 240, 0.96);
    font-size: 13px;
    line-height: 1.6;
}

.admin-home-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-home-metric-card {
    display: grid;
    gap: 8px;
    padding: 16px 16px 15px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbe4ef;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.admin-home-metric-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-home-metric-card strong {
    color: #0f172a;
    font-size: 21px;
    line-height: 1.25;
}

.admin-home-metric-card p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
}

.admin-home-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.86fr);
    gap: 16px;
}

.admin-home-primary-column,
.admin-home-side-column {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.admin-home-panel {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.admin-home-panel-emphasis {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.admin-home-panel-soft {
    background: #f8fbff;
}

.admin-home-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-home-panel-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.admin-home-panel h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.3;
    color: #0f172a;
}

.admin-home-checklist {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    line-height: 1.8;
    display: grid;
    gap: 6px;
}

.admin-home-route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-home-route-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #dbe4ef;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #0f172a;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-home-route-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.admin-home-route-label {
    display: inline-flex;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    align-items: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.admin-home-route-card strong {
    font-size: 17px;
    line-height: 1.35;
}

.admin-home-route-card p,
.admin-home-side-copy {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
}

.admin-home-links {
    display: grid;
    gap: 8px;
}

.admin-home-links a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.admin-home-links a:hover {
    background: #dbeafe;
    transform: translateX(2px);
}

.admin-global-toast {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 11000;
    min-width: 240px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-global-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.admin-global-toast-success {
    background: #15803d;
    border-color: #86efac;
    color: #f0fdf4;
}

.admin-global-toast-error {
    background: #b91c1c;
    border-color: #fecaca;
    color: #fef2f2;
}

.admin-global-toast-info {
    background: #1d4ed8;
    border-color: #bfdbfe;
    color: #eff6ff;
}

.admin-global-toast-warning {
    background: #b45309;
    border-color: #fed7aa;
    color: #fff7ed;
}

@media (max-width: 768px) {
    .admin-home-hero {
        grid-template-columns: 1fr;
        padding: 22px 20px;
    }

    .admin-home-strip,
    .admin-home-route-grid,
    .admin-home-workbench {
        grid-template-columns: 1fr;
    }

    .admin-global-toast {
        right: 16px;
        left: 16px;
        bottom: 16px;
        max-width: none;
        min-width: 0;
    }
}
