:root {
    --bg-body: #f5f7fb;
    --bg-surface: #ffffff;
    --bg-surface-soft: #f8fbff;
    --bg-sidebar-active: #eef4ff;
    --bg-input: #f9fbff;
    --text-primary: #1f2937;
    --text-secondary: #667085;
    --text-muted: #94a3b8;
    --border-color: #e5e7eb;
    --border-soft: #edf2f7;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --primary-blue: #4f6ff6;
    --primary-blue-soft: #edf2ff;
    --card-purple-start: #6e7be8;
    --card-purple-end: #7251b5;
    --card-teal-start: #4ea0c7;
    --card-teal-end: #78c8e6;
    --card-green-start: #47b38d;
    --card-green-end: #67e585;
    --card-orange-start: #ef5a24;
    --card-orange-end: #f4b23b;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --font-sans: "Segoe UI", "Noto Sans Myanmar", "Pyidaungsu", Tahoma, Geneva, Verdana, sans-serif;
    --sidebar-width: 320px;
    --header-height: 88px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.app-body {
    background: var(--bg-body);
}

.app-shell {
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding: 0 28px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.app-header-left,
.app-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.app-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--primary-blue);
    background: linear-gradient(145deg, #f7faff 0%, #edf4ff 100%);
    box-shadow: inset 0 0 0 1px #dce8ff;
    font-size: 21px;
}

.app-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.app-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #5866f2;
    letter-spacing: -0.03em;
}

.app-user-summary {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-user-meta {
    text-align: right;
}

.app-user-meta h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #111f3c;
}

.app-user-meta span {
    color: #6b7c98;
    font-size: 13px;
    font-weight: 500;
}

.app-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #5a63ea, #7077f4);
    color: #ffffff;
    font-size: 28px;
    box-shadow: var(--shadow-sm);
}

.app-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 14px;
    color: #e15252;
    background: #fff5f5;
    transition: 0.2s ease;
}

.app-logout-link:hover {
    color: #c33333;
    background: #ffe9e9;
}

.app-layout {
    display: flex;
    align-items: stretch;
}

.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-soft);
    min-height: calc(100vh - var(--header-height));
}

.app-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-sidebar-nav {
    flex: 1;
    padding: 10px 0 20px;
    overflow-y: auto;
}

.sidebar-section {
    padding: 0 16px;
    margin-bottom: 10px;
}

.sidebar-section-title {
    margin: 0;
    color: #5f6f88;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.sidebar-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 10px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.sidebar-section-toggle.active,
.sidebar-section-toggle:hover {
    color: #334155;
}

.sidebar-section-arrow {
    color: #8ea0bb;
    font-size: 13px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-section.is-open .sidebar-section-arrow {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.sidebar-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-collapsible-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.sidebar-section.is-open .sidebar-collapsible-menu {
    max-height: 520px;
}

.sidebar-menu-item + .sidebar-menu-item {
    margin-top: 5px;
}

.sidebar-menu-link,
.sidebar-signout-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 0;
    color: #5a6d8f;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-menu-link:hover,
.sidebar-signout-link:hover {
    color: #5568f0;
    background: #f7faff;
}

.sidebar-menu-link.active {
    color: #4c5ff0;
    background: var(--bg-sidebar-active);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(85, 104, 240, 0.04);
}

.sidebar-menu-link.active::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 5px;
    height: 100%;
    background: #5666ef;
}

.sidebar-menu-icon {
    width: 24px;
    text-align: center;
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0.95;
}

.sidebar-menu-label {
    flex: 1;
    line-height: 1.25;
}

.app-sidebar-footer {
    padding: 14px 16px 18px;
    border-top: 1px solid var(--border-soft);
}

.sidebar-signout-link {
    color: #e25757;
    background: transparent;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
}

.sidebar-signout-link:hover {
    background: #fff1f1;
    color: #cf3e3e;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.app-content {
    padding: 26px 28px 32px;
}

.content-panel,
.dashboard-panel,
.dashboard-quick-panel,
.dashboard-table-card,
.metric-card,
.empty-state-box {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.content-panel {
    padding: 0;
}

.content-panel-body {
    padding: 36px;
}

.empty-state-box {
    padding: 42px 32px;
    text-align: center;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: #fff4db;
    color: #f59e0b;
    font-size: 28px;
}

.app-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.app-page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: #14213d;
}

.app-page-subtitle {
    margin: 6px 0 0;
    color: #62738f;
    font-size: 14px;
    font-weight: 500;
}

.app-page-meta-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--bg-surface);
    border: 1px solid #e7ebf0;
    box-shadow: var(--shadow-sm);
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.app-page-meta-card i {
    color: var(--primary-blue);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 28px 30px;
    min-height: 152px;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -12px;
    bottom: -12px;
    width: 118px;
    height: 118px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(18deg);
}

.metric-card-content,
.metric-card-icon {
    position: relative;
    z-index: 1;
}

.metric-card-content {
    max-width: calc(100% - 72px);
}

.metric-card-label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.95;
}

.metric-card-value {
    margin: 0;
    font-size: 35px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.metric-card-subtext {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

.metric-card-icon {
    position: absolute;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 52px;
    color: rgba(255, 255, 255, 0.28);
}

.metric-card-purple {
    background: linear-gradient(135deg, var(--card-purple-start) 0%, var(--card-purple-end) 100%);
}

.metric-card-teal {
    background: linear-gradient(135deg, var(--card-teal-start) 0%, var(--card-teal-end) 100%);
}

.metric-card-green {
    background: linear-gradient(135deg, var(--card-green-start) 0%, var(--card-green-end) 100%);
}

.metric-card-orange {
    background: linear-gradient(135deg, var(--card-orange-start) 0%, var(--card-orange-end) 100%);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.95fr);
    gap: 28px;
}

.dashboard-table-card,
.dashboard-quick-panel {
    padding: 24px 24px 26px;
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #14213d;
}

.dashboard-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 2px solid #5f7cff;
    border-radius: 999px;
    color: #4f6ff6;
    background: #ffffff;
    font-weight: 700;
    transition: 0.2s ease;
}

.dashboard-card-action:hover {
    background: #f5f8ff;
}

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

.table-clean thead th {
    padding: 14px 14px 14px 0;
    border-bottom: 1px solid var(--border-color);
    color: #5d6b82;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.table-clean tbody td {
    padding: 18px 14px 18px 0;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    font-size: 15px;
    font-weight: 500;
}

.table-clean thead th:last-child,
.table-clean tbody td:last-child {
    padding-right: 0;
}

.table-empty-state {
    padding: 58px 16px;
    color: #6b7280;
    text-align: center;
    font-size: 16px;
}

.dashboard-quick-list {
    display: grid;
    gap: 18px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 18px;
    border-radius: 20px;
    background: #f9fbff;
    border: 1px solid #eff4f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    font-size: 29px;
    flex-shrink: 0;
}

.quick-action-icon-purple {
    background: #e8edff;
    color: #4f6ff6;
}

.quick-action-icon-green {
    background: #e6f5eb;
    color: #3ca46d;
}

.quick-action-icon-orange {
    background: #fff3dc;
    color: #f0a400;
}

.quick-action-content h4 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #16233f;
}

.quick-action-content p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(110, 123, 232, 0.14), transparent 32%),
        radial-gradient(circle at bottom right, rgba(103, 229, 133, 0.12), transparent 34%),
        linear-gradient(180deg, #f7f9ff 0%, #f2f5fb 100%);
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(440px, 0.85fr);
    width: min(1180px, 100%);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

.login-brand-panel {
    padding: 44px 44px 40px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(238, 243, 255, 0.88)),
        linear-gradient(135deg, #eff3ff 0%, #ffffff 100%);
}

.login-brand-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 34px;
}

.login-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: linear-gradient(145deg, #edf2ff 0%, #ffffff 100%);
    box-shadow: inset 0 0 0 1px #d8e3ff;
}

.login-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 24px;
}

.login-brand-icon {
    color: var(--primary-blue);
    font-size: 32px;
}

.login-brand-label {
    margin: 0 0 8px;
    color: #63749b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-brand-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-brand-content h2 {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.login-brand-content > p {
    margin: 0 0 28px;
    color: #62738f;
    font-size: 15px;
    max-width: 640px;
}

.login-feature-list {
    display: grid;
    gap: 18px;
}

.login-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ebf0f7;
}

.login-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 20px;
    flex-shrink: 0;
}

.login-feature-purple {
    color: #5c63e4;
    background: #e8ecff;
}

.login-feature-teal {
    color: #2488ad;
    background: #ddf4fb;
}

.login-feature-green {
    color: #2e9a69;
    background: #e3f6ea;
}

.login-feature-item h3 {
    margin: 2px 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #16233f;
}

.login-feature-item p {
    margin: 0;
    color: #62738f;
    font-size: 14px;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 34px;
    background: rgba(255, 255, 255, 0.9);
}

.login-form-card {
    width: min(430px, 100%);
}

.login-form-header {
    margin-bottom: 24px;
}

.login-form-kicker {
    margin: 0 0 8px;
    color: #5c6de8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-form-header h2 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.login-form-header p {
    margin: 0;
    color: #62738f;
    font-size: 14px;
}

.login-input-group {
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-input);
}

.login-input-group .input-group-text,
.login-input-group .btn,
.login-input-group .form-control {
    border: 0;
    background: transparent;
    min-height: 54px;
}

.login-input-group .input-group-text {
    color: #7b879c;
    padding-left: 18px;
    padding-right: 12px;
}

.login-input-group .form-control {
    box-shadow: none;
    color: var(--text-primary);
}

.login-password-toggle {
    color: #71829f;
}

.login-submit-btn {
    min-height: 56px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #5a66ee 0%, #6f78f4 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 18px 30px rgba(79, 111, 246, 0.24);
}

.login-submit-btn:hover,
.login-submit-btn:focus {
    color: #ffffff;
    opacity: 0.96;
}

.login-footer-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.login-footer-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4fd08f;
}

.form-label {
    margin-bottom: 8px;
    color: #34435f;
    font-size: 13px;
    font-weight: 700;
}

.form-control,
.form-select {
    color: #22314d;
    font-size: 15px;
    font-weight: 500;
}

.form-control::placeholder {
    color: #8b99af;
    font-weight: 500;
}

.text-muted {
    color: #73839d !important;
    font-weight: 500;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    padding: 6px 10px;
}

.form-control,
.form-select,
.btn {
    border-radius: 14px;
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #5366ef 0%, #7181f6 100%);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #495ce5 0%, #6677f0 100%);
}

.app-sidebar-toggle,
.app-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #eef3ff;
    color: #4f6ff6;
    font-size: 18px;
}

.app-sidebar-mobile-top {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--border-soft);
}

.app-sidebar-mobile-top span {
    font-size: 15px;
    font-weight: 800;
}

.app-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1030;
}

body.sidebar-open .app-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.alert {
    border-radius: 16px;
    padding: 14px 18px;
}

.table-responsive {
    border-radius: 18px;
}

@media (max-width: 1399.98px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .app-header {
        padding: 0 20px;
    }

    .app-content {
        padding: 22px 20px 26px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .login-brand-panel {
        padding-bottom: 26px;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        min-height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: var(--shadow-lg);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar-mobile-top {
        display: flex;
    }

    .app-header-right {
        gap: 12px;
    }

    .app-user-meta {
        display: none;
    }

    .app-logout-link span {
        display: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --sidebar-width: 290px;
        --header-height: 78px;
    }

    .app-header {
        padding: 0 16px;
    }

    .app-brand-text {
        font-size: 17px;
    }

    .app-content {
        padding: 18px 16px 24px;
    }

    .app-page-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 22px;
    }

    .app-page-title {
        font-size: 26px;
    }

    .app-page-subtitle {
        font-size: 15px;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .metric-card {
        min-height: 140px;
        padding: 24px;
    }

    .metric-card-icon {
        right: 20px;
        font-size: 46px;
    }

    .dashboard-table-card,
    .dashboard-quick-panel,
    .content-panel-body {
        padding: 20px;
    }

    .dashboard-card-title {
        font-size: 20px;
    }

    .dashboard-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-action-item {
        padding: 16px;
    }

    .quick-action-icon {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }

    .login-shell {
        padding: 22px 14px;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 26px 20px;
    }

    .login-brand-top {
        align-items: flex-start;
        gap: 14px;
    }

    .login-brand-title {
        font-size: 28px;
    }

    .login-brand-content h2,
    .login-form-header h2 {
        font-size: 26px;
    }
}
