:root {
    --app-bg: #f6f8fc;
    --app-surface: #ffffff;
    --app-text: #1f2937;
    --app-muted: #6b7280;
    --app-primary: #0f7a8a;
    --app-primary-dark: #0c5f6d;
    --app-accent: #2f6bd6;
    --app-border: #e5e7eb;
    --app-shadow: 0 10px 30px rgba(18, 40, 76, 0.08);
}

body.app-shell {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 56%, #f2f8ff 100%);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--app-text);
    font-size: 14px;
}

.app-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 3px 16px rgba(9, 31, 66, 0.06);
}

.topbar-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-logo {
    height: 34px;
    width: auto;
}

.topbar-title {
    font-size: 18px;
    margin: 0;
    color: #111827;
    font-weight: 600;
}

.user-menu-link .user-name {
    font-weight: 600;
    color: #1f2937;
}

.app-sidebar {
    background: #ffffff !important;
    border-right: 1px solid #d8e8f5;
    box-shadow: 8px 0 26px rgba(38, 104, 152, 0.1);
}

.app-brand {
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%);
    border-bottom: 1px solid #d8e8f5;
    color: #ffffff !important;
}

.app-brand .brand-image {
    opacity: 1;
}

.app-brand .brand-text {
    color: #ffffff;
    font-weight: 600;
}

.nav-sidebar .nav-link {
    font-size: 14px;
    color: #29445b !important;
    border-radius: 8px;
    margin: 3px 8px;
}

.nav-sidebar .nav-link:hover {
    background: #eef7ff !important;
    color: #2d6f9f !important;
}

.nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(45, 111, 159, 0.22);
}

.nav-sidebar .nav-link.active i,
.nav-sidebar .nav-link.active p {
    color: #ffffff !important;
}

.nav-treeview .nav-link {
    padding-left: 18px;
    font-size: 13px;
}

/* Sidebar closed by default + expand on hover */
body.sidebar-mini.sidebar-collapse .main-sidebar {
    width: 4.6rem;
    overflow: hidden;
}

body.sidebar-mini.sidebar-collapse .content-wrapper,
body.sidebar-mini.sidebar-collapse .main-footer,
body.sidebar-mini.sidebar-collapse .main-header {
    margin-left: 4.6rem !important;
}

body.sidebar-mini.sidebar-collapse .main-sidebar:hover {
    width: 250px;
}

body.sidebar-mini.sidebar-collapse .main-sidebar:hover ~ .content-wrapper,
body.sidebar-mini.sidebar-collapse .main-sidebar:hover ~ .main-footer,
body.sidebar-mini.sidebar-collapse .main-sidebar:hover ~ .main-header {
    margin-left: 250px !important;
}

.app-content {
    background: transparent;
}

.app-footer {
    font-size: 13px;
    color: var(--app-muted);
    background: #ffffff;
    border-top: 1px solid var(--app-border);
}

.app-page-card {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow);
    background: #fff;
}

.page-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(120deg, #ffffff 0%, #f3f9ff 100%);
    border-bottom: 1px solid var(--app-border);
}

.app-btn-primary {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--app-accent), var(--app-primary));
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(44, 111, 194, 0.25);
}

.app-btn-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, #255bb8, #0f6674);
}

.login-v2-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(120deg, #ffffff 0%, #f2f6ff 52%, #eef8ff 100%);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.login-v2-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.login-v2-brand-panel {
    position: relative;
    background: url('/Adminassets/img/2.jpg') center center / cover no-repeat;
}

.brand-panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(26, 77, 128, 0.8), rgba(20, 124, 136, 0.66));
}

.brand-panel-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 24px;
}

.login-brand-logo {
    width: 94px;
    margin-bottom: 18px;
}

.brand-panel-content h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 6px;
}

.brand-panel-content p {
    font-size: 16px;
    margin: 0;
    opacity: 0.94;
}

.login-v2-form-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 26px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--app-shadow);
    padding: 30px;
}

.login-card h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.login-subtitle {
    color: var(--app-muted);
    margin-top: 6px;
    margin-bottom: 22px;
}

.login-card label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-card .form-control {
    height: 44px;
    border-color: #d1d5db;
    font-size: 14px;
}

.login-card .input-group-text {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.login-footer-note {
    margin-top: 18px;
    border-top: 1px solid #f0f1f4;
    padding-top: 14px;
    color: #6b7280;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

.master-form-wrap {
    width: 100%;
    margin: 12px 0 24px;
    border: 1px solid #b8d4ea;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(36, 91, 136, 0.12);
}

.master-form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 18px;
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%);
    color: #ffffff;
}

.master-form-title h5 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
}

.master-form-title .btn {
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: none;
}

.master-form-title .btn:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.master-form-table {
    width: 100%;
    border-collapse: collapse;
}

.master-form-table th,
.master-form-table td {
    border: 1px solid #d8e4ee;
    padding: 12px 14px;
    vertical-align: middle;
}

.master-form-table th {
    width: 180px;
    background: #f4f9fd;
    color: #27435a;
    font-size: 13px;
    font-weight: 600;
}

.master-form-table td {
    background: #ffffff;
}

.master-field-md {
    max-width: 33.333333%;
    min-width: 320px;
}

.booking-form-table th {
    width: 14%;
}

.booking-form-table td {
    width: 36%;
}

.booking-form-table .master-field-md {
    max-width: 100%;
    min-width: 0;
}

.master-form-table .form-control,
.master-form-table .select2-container--default .select2-selection--single {
    min-height: 39px;
    border: 1px solid #c8d8e6;
    border-radius: 7px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: inset 0 1px 2px rgba(16, 64, 102, 0.05), 0 5px 14px rgba(47, 107, 166, 0.1);
    font-size: 14px;
}

.master-form-table .form-control:focus {
    border-color: #5fa8db;
    box-shadow: 0 0 0 3px rgba(95, 168, 219, 0.18), 0 5px 14px rgba(47, 107, 166, 0.1);
}

.office-otp-btn {
    min-height: 39px;
    border: 1px solid transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(22, 68, 105, 0.16);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.office-otp-btn i {
    margin-right: 5px;
    transition: transform 0.2s ease;
}

.office-otp-send {
    border-color: #267ab9;
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%);
}

.office-otp-verify {
    border-color: #18844b;
    background: linear-gradient(135deg, #1e8f52 0%, #43bd7e 100%);
}

.office-otp-send:hover,
.office-otp-send:focus {
    color: #fff;
    border-color: #195f94;
    background: linear-gradient(135deg, #24618f 0%, #62b5ed 100%);
    box-shadow: 0 7px 14px rgba(39, 113, 171, 0.34);
    transform: translateY(-1px);
}

.office-otp-verify:hover,
.office-otp-verify:focus {
    color: #fff;
    border-color: #11723e;
    background: linear-gradient(135deg, #157744 0%, #59cf90 100%);
    box-shadow: 0 7px 14px rgba(24, 132, 75, 0.31);
    transform: translateY(-1px);
}

.office-otp-btn:hover i,
.office-otp-btn:focus i {
    transform: translateX(2px);
}

.office-otp-btn:active {
    box-shadow: 0 2px 6px rgba(22, 68, 105, 0.2);
    transform: translateY(1px);
}

.office-otp-group .office-otp-btn {
    border-radius: 0;
}

.office-otp-group .office-otp-btn:last-child {
    border-radius: 0 7px 7px 0;
}

.office-otp-status {
    display: block;
    min-height: 19px;
    margin: 8px 0 0 3px;
    font-size: 12.5px;
    font-weight: 600;
}

.office-otp-status.text-success {
    color: #16884c !important;
}

.office-otp-status.text-danger {
    color: #c7343a !important;
}

.master-form-actions {
    padding: 18px;
    border-top: 1px solid #d8e4ee;
    background: #fbfdff;
}

.master-form-actions .btn-primary2 {
    border: none;
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(45, 111, 159, 0.22);
}

.master-required {
    color: #d71920;
}

.master-filter-card,
.master-grid-card {
    border: 1px solid #b8d4ea;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(36, 91, 136, 0.1);
}

.master-summary-row {
    margin-bottom: 8px;
}

.master-summary-card {
    display: flex;
    align-items: center;
    min-height: 104px;
    margin-bottom: 15px;
    padding: 18px 20px;
    border: 1px solid #d2e1ee;
    border-left: 5px solid #3d87bd;
    border-radius: 10px;
    background: #ffffff;
    color: #27435a;
    box-shadow: 0 9px 22px rgba(36, 91, 136, 0.09);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.master-summary-card:hover,
.master-summary-card.selected {
    transform: translateY(-2px);
    color: #27435a;
    box-shadow: 0 14px 28px rgba(36, 91, 136, 0.18);
}

.master-summary-card.selected {
    border-color: #82b9dd;
    background: #f6fbff;
}

.master-summary-card.active {
    border-left-color: #28a745;
}

.master-summary-card.inactive {
    border-left-color: #dc3545;
}

.master-summary-card .summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-right: 18px;
    border-radius: 50%;
    background: #e8f3fb;
    color: #357db3;
    font-size: 25px;
}

.master-summary-card.active .summary-icon {
    background: #e6f5e9;
    color: #28a745;
}

.master-summary-card.inactive .summary-icon {
    background: #fbe8ea;
    color: #dc3545;
}

.master-summary-card .summary-copy small {
    display: block;
    margin-bottom: 2px;
    color: #647d91;
    font-size: 14px;
    font-weight: 600;
}

.master-summary-card .summary-copy strong {
    display: block;
    color: #223d53;
    font-size: 32px;
    line-height: 1.15;
}

.master-filter-card .card-header,
.master-grid-title {
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%);
    color: #ffffff;
}

.master-filter-card .btn-tool,
.master-filter-card .card-title,
.master-grid-title h5 {
    color: #ffffff;
}

.master-grid-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    margin: -1rem -1rem 1rem;
    padding: 0 16px;
}

.master-grid-title h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.master-grid-title .btn {
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.master-grid-title .btn:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.master-grid-table {
    border-color: #d8e4ee;
}

.master-grid-table thead th {
    background: #f4f9fd;
    color: #27435a;
    border-color: #d8e4ee;
    font-weight: 600;
}

.master-grid-table td {
    border-color: #d8e4ee;
    vertical-align: middle;
}

.master-grid-table tbody tr:hover {
    background: #f8fcff;
}

@media (max-width: 991.98px) {
    body.sidebar-mini.sidebar-collapse .main-sidebar {
        width: 250px;
    }

    body.sidebar-mini.sidebar-collapse .content-wrapper,
    body.sidebar-mini.sidebar-collapse .main-footer,
    body.sidebar-mini.sidebar-collapse .main-header {
        margin-left: 0 !important;
    }

    .login-v2-shell {
        grid-template-columns: 1fr;
    }

    .login-v2-brand-panel {
        min-height: 220px;
    }

    .brand-panel-content {
        min-height: 220px;
    }

    .brand-panel-content h1 {
        font-size: 24px;
    }

    .login-card {
        margin-top: -35px;
    }

    .master-form-table,
    .master-form-table tbody,
    .master-form-table tr,
    .master-form-table th,
    .master-form-table td {
        display: block;
        width: 100%;
    }

    .master-form-table th {
        border-bottom: 0;
    }

    .master-field-md {
        max-width: 100%;
        min-width: 0;
    }

}

/* Gradient theme for primary buttons and active paging */
.btn-primary, .btn-primary2 {
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(45, 111, 159, 0.22) !important;
}

.btn-primary:hover, .btn-primary2:hover {
    background: linear-gradient(135deg, #225a82 0%, #3a86b8 100%) !important;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #2d6f9f 0%, #4b9fd7 100%) !important;
    border-color: #2d6f9f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(45, 111, 159, 0.2) !important;
}

.page-link {
    color: #2d6f9f !important;
    font-weight: 500;
}

.page-link:hover {
    background: #eef7ff !important;
    color: #2d6f9f !important;
}
