:root {
    --app-bg: #f5f8fd;
    --app-ink: #0f2036;
    --app-muted: #607d8b;
    --app-line: #e3ebf4;
    --app-blue: #1e88e5;
    --app-blue-dark: #1565c0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--app-bg);
    color: var(--app-ink);
    font-family: 'Inter', 'Roboto', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
}

body > .d-flex.flex-column.h-100,
body > main {
    flex: 1;
    min-height: 0;
}

.site-footer {
    margin-top: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--app-ink);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    letter-spacing: -.01em;
}

a {
    color: var(--app-blue-dark);
}

a:hover {
    color: #0d47a1;
}

.card {
    border: 1px solid var(--app-line);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 32, 54, .05);
}

.card-header {
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--app-line);
    font-weight: 600;
}

.card-footer {
    padding: .9rem 1.25rem;
    background: #fff;
    border-top: 1px solid var(--app-line);
}

.card-body {
    padding: 1.25rem;
}

.btn {
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 600;
    padding: .55rem 1rem;
}

.btn-sm {
    border-radius: 8px;
    font-size: .8rem;
    padding: .35rem .7rem;
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    box-shadow: 0 6px 16px rgba(30, 136, 229, .2);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border: 0;
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    box-shadow: 0 8px 20px rgba(30, 136, 229, .28);
}

.btn-outline-primary {
    border-color: #bbdefb;
    color: var(--app-blue-dark);
}

.btn-outline-primary:hover {
    border-color: var(--app-blue);
    background: #e3f2fd;
    color: var(--app-blue-dark);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label,
label {
    margin-bottom: .4rem;
    /* color: #37474f; */
    font-size: .85rem;
    font-weight: 600;
}

.form-control,
.form-select {
    border: 1px solid #dce6f0;
    border-radius: 9px;
    background-color: #fff;
    color: var(--app-ink);
    font-size: .9rem;
}

textarea.form-control {
    min-height: 100px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .12);
}

.form-check-input:checked {
    background-color: var(--app-blue);
    border-color: var(--app-blue);
}

.table {
    --bs-table-border-color: #e9eff5;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .75rem .9rem;
    border-bottom-color: #e9eff5;
}

.table thead th {
    background: #f7fafd;
    border-bottom: 1px solid var(--app-line);
    color: var(--app-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.table-hover > tbody > tr:hover > * {
    background: #f5f9ff;
}

.breadcrumb {
    margin-bottom: 1rem;
    padding: 0;
    background: transparent;
    font-size: .82rem;
}

.breadcrumb-item a {
    color: var(--app-blue-dark);
    font-weight: 500;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #b0bec5;
    content: '/';
}

.alert {
    border: 0;
    border-radius: 12px;
    font-size: .875rem;
}

.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(15, 32, 54, .22);
}

.modal-header,
.modal-footer {
    padding: 1rem 1.25rem;
    border-color: #e9eff5;
}

.modal-body {
    padding: 1.25rem;
}

.nav-tabs {
    border-bottom: 1px solid var(--app-line);
}

.nav-tabs .nav-link {
    padding: .6rem .9rem;
    border: 0;
    color: var(--app-muted);
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    border-bottom: 2px solid var(--app-blue);
    background: transparent;
    color: var(--app-blue-dark);
}

.nav-pills .nav-link {
    border-radius: 8px;
}

.nav-pills .nav-link.active {
    background: var(--app-blue);
}

.dropdown-menu {
    padding: 6px;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 32, 54, .12);
}

.dropdown-item {
    padding: .5rem .7rem;
    border-radius: 8px;
    font-size: .875rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #e3f2fd;
    color: var(--app-blue-dark);
}

.badge {
    padding: .4em .65em;
    border-radius: 999px;
    font-weight: 600;
}

.list-group-item {
    border-color: #e9eff5;
}

.pagination .page-link {
    margin: 0 2px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    color: var(--app-blue-dark);
}

.pagination .page-item.active .page-link {
    border-color: var(--app-blue);
    background: var(--app-blue);
}

.progress {
    height: .5rem;
    border-radius: 999px;
}

.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 26px 30px;
    border-radius: 18px;
    background: linear-gradient(140deg, #1e88e5, #1565c0);
    color: #fff;
    box-shadow: 0 16px 38px rgba(21, 101, 192, .18);
}

.page-hero::after {
    content: '';
    position: absolute;
    top: -150px;
    right: -90px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.page-hero__icon {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex: 0 0 auto;
}

.page-hero__body {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 26px;
    font-weight: 600;
}

.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 13.5px;
    line-height: 1.55;
}

@media (max-width: 575.98px) {
    .page-hero {
        align-items: flex-start;
        padding: 20px 18px;
        gap: 14px;
    }

    .page-hero__icon {
        width: 44px;
        height: 44px;
        font-size: 21px;
        border-radius: 12px;
    }

    .page-hero h1 {
        font-size: 21px;
    }
}


/* ===== Global page surface & spacing ===== */
.mdk-drawer-layout__content {
    background-color: var(--app-bg);
}

.container,
.container-fluid {
    padding-left: 24px;
    padding-right: 24px;
}

.breadcrumb {
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--app-line);
}

.breadcrumb + .page-hero,
.breadcrumb + .card {
    margin-top: 2px;
}

/* ===== Legacy form layout ===== */
.mdk-drawer-layout__content form .row {
    margin-bottom: 12px;
}

/* .mdk-drawer-layout__content form .row > div:first-child {
    padding-top: 10px;
    color: #37474f;
    font-size: .875rem;
    font-weight: 600;
} */

.mdk-drawer-layout__content form .required {
    color: #e53935;
}

.mdk-drawer-layout__content input[type="text"],
.mdk-drawer-layout__content input[type="email"],
.mdk-drawer-layout__content input[type="password"],
.mdk-drawer-layout__content input[type="number"],
.mdk-drawer-layout__content input[type="date"],
.mdk-drawer-layout__content input[type="time"],
.mdk-drawer-layout__content input[type="datetime-local"],
.mdk-drawer-layout__content select,
.mdk-drawer-layout__content textarea {
    width: 100%;
    min-height: 44px;
    padding: .5rem .8rem;
    border: 1px solid #dce6f0;
    border-radius: 9px;
    background-color: #fff;
    color: var(--app-ink);
    font-size: .9rem;
}

.mdk-drawer-layout__content input:focus,
.mdk-drawer-layout__content select:focus,
.mdk-drawer-layout__content textarea:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .12);
    outline: none;
}

.mdk-drawer-layout__content input[type="submit"]:not([class]),
.mdk-drawer-layout__content input[type="button"]:not([class]),
.mdk-drawer-layout__content button:not([class]) {
    padding: .55rem 1rem;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}

.mdk-drawer-layout__content input[type="submit"]:not([class]):hover,
.mdk-drawer-layout__content input[type="button"]:not([class]):hover,
.mdk-drawer-layout__content button:not([class]):hover {
    background: linear-gradient(135deg, #1976d2, #0d47a1);
}

/* Chosen select alignment */
.mdk-drawer-layout__content .chosen-container-single .chosen-single,
.mdk-drawer-layout__content .chosen-container-multi .chosen-choices {
    min-height: 44px;
    padding-top: 4px;
    border: 1px solid #dce6f0;
    border-radius: 9px;
    background: #fff;
}

.mdk-drawer-layout__content .chosen-container-single .chosen-single {
    line-height: 34px;
}

.mdk-drawer-layout__content .chosen-container-single .chosen-single span {
    font-size: .9rem;
    color: var(--app-ink);
}

.mdk-drawer-layout__content .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
    min-height: 0;
    padding: 8px;
    border: 0;
}


.mdk-drawer-layout__content .input-group > .form-control,
.mdk-drawer-layout__content .input-group > input,
.mdk-drawer-layout__content .input-group > select {
    flex: 1 1 auto;
    width: 1%;
}

.mdk-drawer-layout__content .input-group > .input-group-text {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
}


.quill-editor {
    height: 220px !important;
    overflow: hidden;
}

.quill-editor .ql-editor {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto;
}

.quill-editor-experience {
    min-height: 0 !important;
}

.quill-editor-text {
    min-height: 0 !important;
}


.ad-hero {
    position: relative;
    overflow: hidden;
}

.ad-hero::after {
    content: '';
    position: absolute;
    top: -140px;
    right: -100px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    pointer-events: none;
}

.ad-hero__body {
    position: relative;
    z-index: 1;
}


.page-hero,
.ad-hero,
.idx-hero,
.profile-hero {
    position: relative !important;
    overflow: hidden !important;
}

.page-hero::after,
.ad-hero::after,
.idx-hero::after,
.profile-hero::after {
    content: '' !important;
    position: absolute !important;
    top: -150px !important;
    right: -90px !important;
    width: 320px !important;
    height: 320px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .08) !important;
    pointer-events: none !important;
}

.page-hero__body,
.ad-hero__body,
.idx-hero__body,
.profile-hero__body {
    position: relative;
    z-index: 1;
}


/* ===== Unified page measurements ===== */
@media (min-width: 768px) {
    .mdk-drawer-layout__content > .container,
    .mdk-drawer-layout__content > .container-fluid {
        width: 100%;
        max-width: 1200px !important; 
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

/* ===== Unified breadcrumbs ===== */
.breadcrumb {
    padding-bottom: 16px !important;
    margin-bottom: 26px !important;
    border-bottom: 1px solid var(--app-line);
    font-size: .84rem;
    font-weight: 500 !important;
}

.breadcrumb-item {
    color: #78909c;
    font-weight: 500;
}

.breadcrumb-item a {
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #37474f;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    padding: 0 8px;
    color: #b0bec5;
}

/* ===== Unified card geometry ===== */
.card,
.ad-card,
.idx-card,
.cm-card,
.profile-card,
.edit-profile-card,
.pmd-kpi-card,
.pmd-dashboard .card,
.pm-nav-card {
    border-radius: 16px !important;
}

.ad-card .card-body,
.idx-card .card-body,
.cm-card .card-body {
    padding: 22px;
}

.ad-card__icon,
.idx-card__icon,
.cm-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

.ad-card__title,
.idx-card h3,
.cm-card h3 {
    font-size: 15.5px;
    font-weight: 600;
}

.ad-card__text,
.idx-card p,
.cm-card p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--app-muted);
}

.ad-card__action,
.idx-card__action,
.cm-card__action {
    font-size: 12.5px;
    font-weight: 600;
    color: #1565c0;
}

/* ===== Unified tab/label weight ===== */
.nav-tabs .nav-link {
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
}

.form-label,
label {
    font-weight: 600;
}


.page-hero,
.ad-hero,
.idx-hero,
.profile-hero {
    border-radius: 18px !important;
}

.card > .card-header:first-child {
    border-radius: 15px 15px 0 0;
}

.card > .card-footer:last-child {
    border-radius: 0 0 15px 15px;
}

.card > .list-group:first-child .list-group-item:first-child {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.card > .list-group:last-child .list-group-item:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}


@media (min-width: 768px) {
    .mdk-drawer-layout__content .container,
    .mdk-drawer-layout__content .container-fluid {
        max-width: 1200px !important; 
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.sidebar-collapsed .mdk-drawer-layout__content > .container,
    body.sidebar-collapsed .mdk-drawer-layout__content > .container-fluid,
    body.sidebar-collapsed .mdk-drawer-layout__content .container,
    body.sidebar-collapsed .mdk-drawer-layout__content .container-fluid {
        max-width: 1400px !important;
    }
}


@media (min-width: 768px) {
    .mdk-drawer-layout__content > .container,
    .mdk-drawer-layout__content > .container-fluid {
        padding-top: 8px !important;
    }
}


a,
a:hover,
a:focus,
a:active,
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.card,
.card:hover,
.card:focus {
    text-decoration: none !important;
}


/* ---------- Air Datepicker ---------- */
.air-datepicker {
    --adp-accent-color: #1e88e5;
    --adp-color: #0f2036;
    --adp-color-secondary: #64748b;
    --adp-color-other-month: #b0bec5;
    --adp-color-disabled: #cfd8dc;
    --adp-background-color: #fff;
    --adp-border-color: #e3ebf4;
    --adp-border-color-inner: #eef3f9;
    --adp-cell-background-color-hover: #e3f2fd;
    --adp-cell-background-color-selected: #1e88e5;
    --adp-cell-color-selected: #fff;
    --adp-cell-border-color: #1e88e5;
    --adp-day-name-color: #64748b;
    --adp-nav-color-secondary: #64748b;
    --adp-font-family: inherit;
    --adp-border-radius: 12px;
    z-index: 2000 !important;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 32, 54, .2);
    font-family: inherit;
}

.air-datepicker-cell {
    border-radius: 8px;
}

.air-datepicker-nav {
    border-bottom: 1px solid #eef3f9;
}

.air-datepicker-button {
    color: #1565c0;
    font-weight: 600;
}

.air-datepicker-body--day-name {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.session-description .quill-editor {
    height: 160px !important;
}
/* Student attendance schedule date pill */
.student-schedule-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #e0eaf5;
    border-radius: 9px;
    background: #f8fbff;
    color: #244b70;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    cursor: default;
}
.student-schedule-pill .schedule-date-icon { color: #167e83; font-size: 13px; }
.student-schedule-pill .schedule-time { color: #60758b; font-variant-numeric: tabular-nums; }
.student-schedule-pill .schedule-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    border-radius: 6px;
    font-size: 10px;
}
.student-schedule-pill .schedule-lock--closed { background: #fff3db; color: #9a6b16; }
.student-schedule-pill .schedule-lock--open { background: #e7f4ee; color: #337b60; }

