﻿html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin: 0;
    min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --bg: #f5f7fb;
    --panel: rgba(255, 255, 255, 0.75);
    --panel-solid: #ffffff;
    --line: rgba(255, 255, 255, 0.25);
    --text: #101828;
    --muted: #667085;
    --primary: #635bff;
    --primary-2: #8b5cf6;
    --hero-indigo-start: #1e1b4b;
    --hero-indigo-mid: #312e81;
    --hero-indigo-end: #4338ca;
    --hero-indigo-shadow: rgba(49, 46, 129, 0.24);
    --sidebar-1: #0f172a;
    --sidebar-2: #1e293b;
    --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, rgba(99,91,255,0.10), transparent 25%), radial-gradient(circle at top right, rgba(139,92,246,0.10), transparent 20%), var(--bg);
    color: var(--text);
    min-height: 100%;
    overflow-x: hidden;
}

.culture-my,
.culture-my body,
.culture-my input,
.culture-my select,
.culture-my textarea,
.culture-my button,
.culture-my .nav-link-modern,
.culture-my .mob-nav-item,
.culture-my .page-btn,
.culture-my .size-btn {
    font-family: 'Noto Sans Myanmar', 'Myanmar Text', 'Padauk', sans-serif;
    letter-spacing: 0;
    word-spacing: 0;
}

.modern-body {
    min-height: 100vh;
}

.hero-modern {
    background: radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 30%), linear-gradient(135deg, var(--hero-indigo-start), var(--hero-indigo-mid) 55%, var(--hero-indigo-end));
    color: white;
    border-radius: 30px;
    padding: 42px;
    box-shadow: 0 20px 40px var(--hero-indigo-shadow);
    position: relative;
    overflow: hidden;
}

    .hero-modern::after {
        content: "";
        position: absolute;
        right: -40px;
        top: -40px;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        background: rgba(255,255,255,0.10);
    }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 8px 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 14px;
    max-width: 700px;
    word-break: break-word;
}

.hero-text {
    color: rgba(255,255,255,0.88);
    max-width: 720px;
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-modern-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #111827;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.btn-modern-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 22px;
}

/* =========================
   LARGE TABLET / SMALL LAPTOP
========================= */
@media (max-width: 1100px) {
    .card-span-4,
    .card-span-6,
    .card-span-8 {
        grid-column: span 12;
    }

    .hero-modern {
        padding: 32px;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* =========================
   TABLET
========================= */
@media (max-width: 900px) {
    .app-shell {
        padding: 12px;
        gap: 12px;
    }

    .sidebar {
        position: fixed;
        left: 12px;
        top: 12px;
        bottom: 12px;
        z-index: 1000;
        width: 260px;
        max-width: calc(100vw - 24px);
        transform: translateX(0);
        overflow-y: auto;
    }

        .sidebar.collapsed {
            transform: translateX(-110%);
            width: 260px;
        }

    .main-panel {
        width: 100%;
        min-width: 0;
    }

    .hero-modern {
        padding: 28px;
        border-radius: 24px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-text {
        font-size: 0.96rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        margin: 0;
    }

    .app-shell {
        padding: 10px;
        gap: 10px;
    }

    .main-panel {
        gap: 14px;
    }

    .hero-modern {
        padding: 22px 18px;
        border-radius: 20px;
    }

        .hero-modern::after {
            width: 140px;
            height: 140px;
            right: -30px;
            top: -30px;
        }

    .hero-badge {
        font-size: 0.8rem;
        padding: 7px 12px;
        margin-bottom: 12px;
    }

    .hero-title {
        font-size: 1.45rem;
        line-height: 1.2;
        margin-bottom: 12px;
    }

    .hero-text {
        font-size: 0.92rem;
        margin-bottom: 18px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-modern-light,
    .btn-modern-glass {
        width: 100%;
        padding: 12px 14px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 16px;
    }
}

/* =========================
   SMALL PHONE
========================= */
@media (max-width: 480px) {
    .app-shell {
        padding: 8px;
    }

    .sidebar {
        left: 8px;
        top: 8px;
        bottom: 8px;
        width: 240px;
        max-width: calc(100vw - 16px);
    }

    .hero-modern {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .hero-text {
        font-size: 0.88rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .btn-modern-light,
    .btn-modern-glass {
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .section-grid {
        gap: 12px;
    }
}


.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #635bff;
    background: #eef2ff;
}

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

.user-name {
    font-size: 0.9rem;
}

.user-menu {
    position: absolute;
    right: 0;
    top: 110%;
    width: 200px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 8px;
    display: none;
    z-index: 1000;
}

    .user-menu.show {
        display: block;
    }

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #111827;
    font-size: 0.9rem;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
}

    .user-menu-item:hover {
        background: #f3f4f6;
    }

.user-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0;
}

.logout-btn {
    color: #dc2626;
}
/* ─────────────────────────────────────────────────────────────
   Pagination bar
   ───────────────────────────────────────────────────────────── */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    font-size: 0.82rem;
    color: #6b7280;
}

.pagination-info {
    white-space: nowrap;
    min-width: 0;
}
.pagination-info strong { color: #111827; }

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 2px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.page-btn:hover { background: #f3f4f6; border-color: #d1d5db; color: #111827; }
.page-btn-active {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
    cursor: default;
}
.page-btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9fafb;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 32px;
    color: #9ca3af;
    font-size: 0.82rem;
}
.page-mobile-label {
    font-size: 0.82rem;
    color: #374151;
    font-weight: 500;
    padding: 0 8px;
    white-space: nowrap;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}
.size-label { color: #9ca3af; margin-right: 2px; }
.size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 6px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: background 0.15s;
}
.size-btn:hover { background: #f3f4f6; color: #111827; }
.size-btn-active {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
    font-weight: 700;
    cursor: default;
}

/* Mobile: stack info + size below the nav, collapse some spacing */
@media (max-width: 480px) {
    .pagination-bar {
        justify-content: center;
        padding: 10px 12px;
    }
    .pagination-info { order: 3; width: 100%; text-align: center; }
    .pagination-nav  { order: 1; }
    .pagination-size { order: 2; }
}

/* Table toolbar (search bar inside table card) */
.table-toolbar {
    padding: 10px 16px 0;
}

/* ─────────────────────────────────────────────────────────────
   Plan usage limit UI — pills, banners, locked buttons
   ───────────────────────────────────────────────────────────── */
.sa-usage-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    margin-top: 6px;
    white-space: nowrap;
}
.sa-usage-pill--warn {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.sa-limit-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: inherit;
    margin-left: 4px;
    opacity: 0.85;
}
.sa-limit-badge--ok {
    background: rgba(255,255,255,0.28);
}

.sa-limit-btn {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.sa-limit-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #78350f;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sa-limit-banner i { color: #d97706; flex-shrink: 0; }
.sa-limit-upgrade-link {
    font-weight: 700;
    color: #6366f1;
    text-decoration: none;
    white-space: nowrap;
    margin-left: auto;
}
.sa-limit-upgrade-link:hover { text-decoration: underline; }

.sa-limit-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    text-align: center;
    color: #6b7280;
}
.sa-limit-locked i { font-size: 2rem; color: #d1d5db; }
.sa-limit-locked p { margin: 0; font-size: 0.9rem; }
