:root {
    --primary-color: #1a5276;
    --primary-dark: #154360;
    --navbar-bg: #1b2838;
    --navbar-hover: #243447;
    --content-bg: #f4f6f9;
    --accent-teal: #17a2b8;
}

body {
    background-color: var(--content-bg);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Top navigation */
.top-navbar {
    background: var(--navbar-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.top-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.top-navbar .navbar-brand:hover {
    color: #fff;
    opacity: 0.9;
}

.top-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.top-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.top-navbar .nav-link {
    color: #c8d6e5;
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.top-navbar .nav-link:hover,
.top-navbar .nav-link:focus {
    color: #fff;
    background: var(--navbar-hover);
}

.top-navbar .nav-link.active {
    color: #fff;
    background: var(--primary-color);
}

.top-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
}

.top-navbar .dropdown-item.active,
.top-navbar .dropdown-item:active {
    background-color: var(--primary-color);
}

.top-navbar .user-menu-toggle {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-area {
    min-height: calc(100vh - 64px);
}

/* Stat cards */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-open .stat-value { color: #2980b9; }
.stat-warning .stat-value { color: #e67e22; }
.stat-success .stat-value { color: #27ae60; }

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f3;
    font-weight: 600;
}

/* Login page */
.login-wrapper {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--accent-teal) 100%);
}

.login-card {
    width: 100%;
    max-width: 480px;
    border: none;
    border-radius: 0.75rem;
}

.privacy-notice {
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    color: #495057;
}

.privacy-notice h6 {
    color: var(--primary-color);
}

/* Request type cards */
.request-type-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}

.request-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tables */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
    font-weight: 600;
    border-bottom-width: 1px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Comments */
.comment-item:last-child {
    border-bottom: none !important;
}

/* Page header */
.page-header h1 {
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 991.98px) {
    .top-navbar .navbar-collapse {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .top-navbar .nav-link {
        margin-bottom: 2px;
    }

    .top-navbar .user-menu-toggle {
        max-width: none;
    }
}

/* Badge sizing */
.badge {
    font-weight: 500;
}

.bg-orange {
    background-color: #fd7e14 !important;
    color: #fff;
}

.npa-inline-select {
    min-width: 72px;
    padding: 0.15rem 1.5rem 0.15rem 0.35rem;
    font-size: 0.75rem;
}

/* New Patient Appointment table */
.npa-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1200px;
}

.npa-table th,
.npa-table td {
    overflow: hidden;
    vertical-align: middle;
}

.npa-col-client {
    width: 200px;
    min-width: 200px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.npa-col-short {
    width: 80px;
    white-space: nowrap;
}

.npa-col-mrn {
    width: 90px;
    white-space: nowrap;
}

.npa-col-date {
    width: 105px;
    white-space: nowrap;
}

.npa-col-status {
    width: 95px;
    white-space: normal;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.25;
}

.npa-col-medium {
    width: 110px;
    white-space: normal;
    word-break: break-word;
}

.npa-col-ins {
    width: 130px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

.npa-col-action {
    width: 80px;
    white-space: nowrap;
}
