
/* ==========================================
   TABUK-MED CONNECT
   PREMIUM RESPONSIVE DESIGN
   ========================================== */

:root {
    --primary: #087f8c;
    --primary-dark: #05636d;
    --primary-light: #e4f4f5;

    --navy: #142d4e;
    --navy-light: #203e60;

    --background: #f3f6fa;
    --surface: #ffffff;

    --text: #26384b;
    --muted: #8290a1;
    --border: #e4eaf0;

    --success: #16845b;
    --warning: #c18425;
    --danger: #c74747;

    --radius: 16px;
    --shadow: 0 8px 28px rgba(20, 45, 78, 0.06);
}

/* GLOBAL RESET */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    color: var(--navy);
    line-height: 1.3;
    font-weight: 750;
}

h1 {
    font-size: clamp(25px, 3vw, 34px);
}

h2 {
    font-size: 23px;
}

p {
    color: var(--muted);
}

/* HEADER */

.navbar,
.dashboard-header {
    min-height: 76px;
    padding: 14px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 15px rgba(20, 45, 78, 0.04);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--navy);
}

.brand-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #0c9da5, #087f8c);
    border-radius: 14px;
    font-size: 28px;
    font-weight: bold;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.nav-links,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

/* BUTTONS */

.btn,
.button,
button,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
    padding: 11px 17px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.btn-primary,
.button:not(.cancel-button),
button[type="submit"],
input[type="submit"] {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(8, 127, 140, .15);
}

.btn-primary:hover,
.button:hover,
button[type="submit"]:hover {
    color: white;
    background: var(--primary-dark);
}

.btn-outline,
.cancel-button {
    color: var(--navy);
    background: white;
    border-color: var(--border);
}

/* MAIN CONTENT */

.dashboard-content,
.appointment-container,
.records-container,
.report-container,
.profile-container {
    width: min(1180px, calc(100% - 48px));
    margin: auto;
    padding-top: 36px;
    padding-bottom: 65px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* DASHBOARD CARDS */

.dashboard-grid,
.service-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.service-card,
.profile-card,
.appointment-panel,
.records-panel,
.report-panel,
.card,
.auth-card,
.visual-card,
.appointment-status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.service-card {
    height: 100%;
    padding: 24px;
    transition: .2s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(20, 45, 78, .10);
}

a.service-card,
.service-card-link {
    color: inherit;
    text-decoration: none;
}

.service-card h3 {
    margin: 12px 0 6px;
    color: var(--navy);
    font-size: 17px;
}

.service-card p {
    font-size: 14px;
}

.service-icon,
.visual-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 23px;
}

/* APPOINTMENTS */

.appointment-status-card {
    margin-top: 28px;
    padding: 25px;
}

.appointment-status-item {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border);
}

.appointment-status-item:last-child {
    border-bottom: none;
}

.appointment-status-badge,
.status,
.badge {
    padding: 5px 11px;
    display: inline-flex;
    align-items: center;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
}

.status-Pending,
.status-pending {
    color: #855600;
    background: #fff2cc;
}

.status-Approved,
.status-approved {
    color: #146849;
    background: #dff7eb;
}

.status-Rejected,
.status-rejected {
    color: #9c2f37;
    background: #ffe6e7;
}

.status-Completed,
.status-completed {
    color: #2454a6;
    background: #e3edff;
}

.status-Cancelled,
.status-cancelled {
    color: #526273;
    background: #e9eef3;
}

/* FORMS */

.form-group {
    margin-bottom: 18px;
}

.form-group label,
label {
    display: block;
    margin-bottom: 7px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 650;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-height: 45px;
    padding: 12px 14px;
    color: var(--text);
    background: white;
    border: 1px solid #d8e1e9;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 127, 140, .12);
}

/* TABLES */

.table-wrapper,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead th {
    color: var(--navy);
    background: #edf3f8;
    font-size: 13px;
    font-weight: 750;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

tbody tr:hover {
    background: #f5fafb;
}

.table-wrapper table,
.table-responsive table {
    min-width: 650px;
}

/* LOGIN AND REGISTRATION */

.auth-page {
    min-height: 100vh;
    padding: 25px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
}

.auth-card {
    width: min(100%, 490px);
    padding: 35px;
    border-radius: 20px;
}

.auth-card h1 {
    color: var(--navy);
}

/* ALERTS */

.error,
.alert-error {
    padding: 12px 15px;
    color: #8f2630;
    background: #fff0f1;
    border: 1px solid #ffd6d9;
    border-radius: 10px;
}

.notice,
.success,
.alert-success {
    padding: 12px 15px;
    color: #145f46;
    background: #e8f8f0;
    border: 1px solid #c9efdd;
    border-radius: 10px;
}

/* MOBILE BOTTOM NAVIGATION
   The navigation markup will be added
   to the individual portal pages later. */

.mobile-bottom-nav {
    display: none;
}

/* TABLET */

@media (max-width: 1024px) {
    .dashboard-content,
    .appointment-container,
    .records-container,
    .report-container,
    .profile-container {
        width: calc(100% - 36px);
    }

    .dashboard-grid,
    .service-grid,
    .steps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MOBILE */

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .navbar,
    .dashboard-header {
        min-height: 65px;
        padding: 12px 16px;
    }

    .nav-links {
        display: none;
    }

    .dashboard-header {
        position: sticky;
        top: 0;
    }

    .dashboard-content,
    .appointment-container,
    .records-container,
    .report-container,
    .profile-container {
        width: calc(100% - 28px);
        padding-top: 25px;
        padding-bottom: 100px;
    }

    .dashboard-grid,
    .service-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .service-card {
        padding: 20px;
    }

    .appointment-status-card {
        padding: 18px;
    }

    .appointment-status-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .auth-card {
        padding: 23px 19px;
    }

    /* BOTTOM NAVIGATION BAR */

    .mobile-bottom-nav {
        position: fixed;
        z-index: 999;
        right: 0;
        bottom: 0;
        left: 0;

        display: flex;
        justify-content: space-around;
        align-items: center;

        min-height: 68px;
        padding: 8px 5px calc(8px + env(safe-area-inset-bottom));

        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--border);
        box-shadow: 0 -5px 20px rgba(20, 45, 78, .08);
    }

    .mobile-nav-item {
        min-width: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;

        color: var(--muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 650;
    }

    .mobile-nav-item .nav-icon {
        font-size: 21px;
        line-height: 1.3;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item.active .nav-icon {
        transform: translateY(-2px);
    }

    .btn,
    .button,
    button,
    input[type="submit"] {
        min-height: 46px;
    }

    .table-wrapper table,
    .table-responsive table {
        min-width: 650px;
    }
}

/* SMALL PHONES */

@media (max-width: 420px) {
    .brand strong {
        font-size: 14px;
    }

    .brand small {
        font-size: 10px;
    }

    h1 {
        font-size: 25px;
    }

    h2 {
        font-size: 21px;
    }

    .dashboard-content,
    .appointment-container,
    .records-container,
    .report-container,
    .profile-container {
        width: calc(100% - 22px);
    }
}

/* ACCESSIBILITY */

:focus-visible {
    outline: 3px solid #e7a93b;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
