@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    background: radial-gradient(circle at top left, #1e293b 0, #0f172a 35%, #020617 80%);
    color: #e5e7eb;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.login-shell .login-card {
    width: 100%;
    max-width: 880px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f9fafb 0, #ffffff 50%, #eef2ff 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.login-left {
    padding: 32px 32px 28px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: #e5f0ff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
}

.login-left-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-left-subtitle {
    font-size: 15px;
    color: #e0ebff;
    max-width: 280px;
}

.login-right {
    padding: 32px 32px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #0f172a;
}

.login-heading {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #0f172a;
}

.login-subheading {
    font-size: 14px;
    color: #475569;
    margin-bottom: 18px;
}

.login-field {
    margin-bottom: 14px;
}

.login-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.login-input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(209, 213, 219, 0.95);
    background: #f9fafb;
    padding: 10px 16px;
    font-size: 16px;
    outline: none;
}

.login-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.45);
    background: #ffffff;
}

.login-button {
    width: 100%;
    margin-top: 6px;
    border-radius: 10px;
    border: none;
    padding: 12px 18px;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    color: #eff6ff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.login-button:hover {
    filter: brightness(1.05);
}

.login-footer {
    font-size: 14px;
    color: #475569;
    margin-top: 10px;
    text-align: center;
}

.login-footer a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.alert {
    margin-bottom: 10px;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.admin-shell {
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    border-right: 1px solid rgba(71, 85, 105, 0.5);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.admin-main {
    flex: 1;
    min-width: 0;
    width: calc(100% - 260px);
    margin-left: 260px;
    padding: 20px 12px 24px;
    box-sizing: border-box;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 4px 0;
}

.admin-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.admin-brand-text {
    font-size: 17px;
    font-weight: 600;
}

.admin-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.admin-menu li {
    margin-bottom: 4px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
    color: #9ca3af;
}

.admin-menu a span.icon {
    font-size: 18px;
}

.admin-menu a.active {
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    color: #f9fafb;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.admin-menu a:hover:not(.active) {
    background: rgba(51, 65, 85, 0.8);
    color: #f1f5f9;
}

.admin-sidebar-footer {
    margin-top: 12px;
    font-size: 13px;
    color: #94a3b8;
}


.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    border: 1px solid rgba(71, 85, 105, 0.8);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-title {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
}

.admin-subtitle {
    font-size: 15px;
    color: #94a3b8;
    margin-top: 4px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.admin-user-pill {
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.btn-logout {
    border-radius: 10px;
    border: none;
    padding: 8px 16px;
    background: rgba(185, 28, 28, 0.9);
    color: #fee2e2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-logout:hover {
    background: #b91c1c;
}

.admin-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.admin-card {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f9fafb 0, #ffffff 40%, #eef2ff 100%);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.admin-card-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
}

.admin-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

.admin-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-count {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.6);
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: #0f172a;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #020617;
}

.stat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-badge {
    padding: 16px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    border: 1px solid rgba(147, 197, 253, 0.6);
    font-size: 15px;
    color: #1e40af;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.stat-badge span.value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 6px;
}

.stat-badge.highlight {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: rgba(52, 211, 153, 0.6);
    color: #065f46;
}

.stat-badge.highlight span.value {
    color: #047857;
}

.table-wrapper {
    max-height: 380px;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

thead {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 1;
}

tbody tr:hover {
    background: #eff6ff;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    font-size: 13px;
    font-weight: 600;
    color: #065f46;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    justify-content: center;
    width: 100%;
}

.action-buttons > * {
    flex: 1 1 0;
}

.action-btn .icon {
    font-size: 15px;
}

.action-btn-print {
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    color: #1e3a8a;
}

.action-btn-edit {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.action-btn-delete {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 9px 20px rgba(15, 23, 42, 0.25);
}

.action-btn-delete:hover {
    filter: brightness(0.97);
}

.admin-card .link-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #2563eb;
    padding: 10px 0;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.admin-card .link-small:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.admin-card .link-small.link-danger {
    color: #b91c1c;
}

.admin-card .link-small.link-danger:hover {
    color: #7f1d1d;
    text-decoration: underline;
}

.admin-quick-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-quick-links li {
    margin-bottom: 8px;
}

.admin-quick-links li:last-child {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        border-bottom: 1px solid #111827;
    }

    .admin-menu {
        display: flex;
        gap: 4px;
    }

    .admin-sidebar-footer {
        display: none;
    }

    .admin-main {
        margin-left: 0;
        padding: 12px 10px 18px;
    }

    .admin-content-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-card {
        grid-template-columns: minmax(0, 1fr);
    }
}

