* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #edf6ff 35%, #dbeafe 100%);
}

.login-wrapper {
    width: min(100%, 480px);
    padding: 24px;
}

.login-panel {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
    padding: 32px 26px;
}

.brand-block {
    text-align: center;
    margin-bottom: 20px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.brand-image {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 3px solid #dbeafe;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.12);
}

.brand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-block h1 {
    margin: 0;
    font-size: 2rem;
}

.brand-block p {
    margin: 8px 0 0;
    color: #475569;
}

.login-form,
.stack-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: #334155;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 12px 14px;
    background: #f8fafc;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 700;
}

.secondary-btn,
.success-btn,
.danger-btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    color: #fff;
    font-weight: 600;
}

.secondary-btn {
    background: #475569;
}

.success-btn {
    background: #16a34a;
}

.danger-btn {
    background: #dc2626;
}

.full-width {
    width: 100%;
}

.demo-box {
    margin-top: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.demo-box h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.demo-box p {
    margin: 6px 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    background: #0f172a;
    color: #fff;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-title {
    display: flex;
    align-items: center;
    min-height: 60px;
}

.brand-title img {
    display: block;
    max-height: 58px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.05);
}

.brand-subtitle-wrap {
    display: flex;
    align-items: center;
    min-height: 58px;
}

.brand-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #cbd5e1;
    font-weight: 700;
    line-height: 1.2;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.notification-button-wrapper {
    position: relative;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s ease;
    color: #0f172a;
}

.notification-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.notification-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: min(100%, 380px);
    max-height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
    border: 1px solid #e2e8f0;
    overflow-y: auto;
    z-index: 999;
    display: none;
}

.notification-panel.active {
    display: block;
}

.notification-panel-header {
    position: sticky;
    top: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-panel-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
}

.notification-panel-close:hover {
    color: #0f172a;
}

.notification-panel-content {
    padding: 12px;
}

.notification-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 3px solid;
}

.notification-item.critical {
    background: #fef2f2;
    border-left-color: #dc2626;
    color: #991b1b;
}

.notification-item.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.notification-item-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.notification-item-list {
    margin: 0;
    padding-left: 18px;
}

.notification-item-list li {
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.dashboard {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.notification-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.notification-box {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
    border-left: 4px solid;
}

.notification-critical {
    background: #fef2f2;
    border-left-color: #dc2626;
    color: #991b1b;
}

.notification-critical strong {
    color: #991b1b;
}

.notification-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.notification-warning strong {
    color: #92400e;
}

.notification-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 0.95rem;
}

.notification-box li {
    margin-bottom: 6px;
}

.panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    padding: 24px;
}

.table-scroll-panel {
    max-height: 420px;
    overflow: auto;
}

.section-header-with-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.table-search {
    margin: 0;
}

.table-search input {
    max-width: 320px;
    width: 100%;
}

.panel h3 {
    margin-top: 0;
    margin-bottom: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    min-width: 640px;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

th {
    background: #f8fafc;
    color: #475569;
    white-space: nowrap;
}

.panel {
    overflow-x: auto;
}

.low-stock {
    background: #fff7ed;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-box {
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    padding: 18px 20px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-box strong {
    font-size: 2rem;
    color: #0f172a;
}

.usage-bar-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.usage-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 999px;
}

.summary-row {
    background: #eff6ff;
    font-weight: 700;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
}

.computer-spec-card {
    margin-top: 18px;
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    padding: 18px;
    display: grid;
    gap: 10px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-row span {
    color: #475569;
}

.spec-row strong {
    text-align: right;
    color: #0f172a;
}

.info-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.info-card p {
    margin: 8px 0;
}

.inline-form {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 6px;
}

table th:last-child,
table td:last-child {
    min-width: 150px;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-content {
    width: min(100%, 520px);
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    padding: 24px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    font-size: 1.5rem;
    line-height: 1;
}

.modal-form {
    gap: 18px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.report-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-start;
}

.report-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.report-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-actions-inline {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.average-report-summary {
    background: #f8fafc;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    padding: 12px 14px;
    color: #334155;
}

.report-table-wrapper {
    overflow-x: auto;
}

.large-modal {
    width: min(100%, 760px);
}

.small-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.flash {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
}

.flash.success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #a7f3d0;
}

.flash.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-declined {
    background: #fee2e2;
    color: #991b1b;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #020817;
        color: #e2e8f0;
    }

    .login-body {
        background: linear-gradient(135deg, #020817 0%, #0f172a 32%, #111827 100%);
    }

    .login-panel,
    .panel,
    .stat-box,
    .info-card,
    .modal-content {
        background: #111827;
        color: #e2e8f0;
        border-color: #334155;
        box-shadow: 0 8px 22px rgba(2, 8, 23, 0.55);
    }

    .panel h3,
    .brand-block h1,
    .stat-box strong,
    .modal-header h3,
    .brand-subtitle {
        color: #f8fafc;
    }

    .topbar {
        background: #020817;
    }

    input,
    select,
    textarea {
        background: #0f172a;
        border-color: #334155;
        color: #f8fafc;
    }

    input::placeholder,
    textarea::placeholder {
        color: #94a3b8;
    }

    label,
    th,
    .demo-box h3,
    .stat-label,
    .flash.success,
    .flash.error {
        color: #e2e8f0;
    }

    th {
        background: #0f172a;
        color: #cbd5e1;
    }

    th,
    td {
        border-bottom-color: #334155;
    }

    .flash.success {
        background: rgba(22, 163, 74, 0.16);
        border-color: rgba(34, 197, 94, 0.35);
    }

    .flash.error {
        background: rgba(239, 68, 68, 0.12);
        border-color: rgba(248, 113, 113, 0.35);
    }

    .notification-critical {
        background: rgba(220, 38, 38, 0.16);
        border-left-color: rgba(220, 38, 38, 0.6);
        color: #fca5a5;
    }

    .notification-critical strong {
        color: #fca5a5;
    }

    .notification-warning {
        background: rgba(245, 158, 11, 0.16);
        border-left-color: rgba(245, 158, 11, 0.6);
        color: #fcd34d;
    }

    .notification-warning strong {
        color: #fcd34d;
    }

    .usage-bar-track {
        background: #1e293b;
    }

    .summary-row {
        background: rgba(37, 99, 235, 0.18);
    }

    .brand-subtitle,
    .dashboard-userbar {
        color: #dbeafe;
    }

    .notification-btn {
        color: #e2e8f0;
    }

    .notification-btn:hover {
        background: rgba(148, 163, 184, 0.1);
    }

    .notification-panel {
        background: #111827;
        border-color: #334155;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
        color: #e2e8f0;
    }

    .notification-panel-header {
        background: #0f172a;
        border-bottom-color: #334155;
        color: #f8fafc;
    }

    .notification-item.critical {
        background: rgba(220, 38, 38, 0.16);
        border-left-color: rgba(220, 38, 38, 0.6);
        color: #fca5a5;
    }

    .notification-item.warning {
        background: rgba(245, 158, 11, 0.16);
        border-left-color: rgba(245, 158, 11, 0.6);
        color: #fcd34d;
    }

    .notification-item-label {
        color: #fca5a5;
    }

    .notification-item.warning .notification-item-label {
        color: #fcd34d;
    }
}

@media (max-width: 700px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .top-actions {
        width: 100%;
        justify-content: space-between;
    }
}
