/* =========================================================
   RESET & GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f7fafc;
    color: #1f2933;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #0d6efd;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   ROOT COLOR
   ========================================================= */

:root {
    --primary-start: #0f766e;
    --primary-end: #0ea5e9;
    --primary: #0ea5e9;
    --accent: #06b6d4;

    --dark: #0f172a;
    --text: #1f2933;
    --muted: #64748b;
    --border: #e2e8f0;

    --sidebar-bg: linear-gradient(
        180deg,
        #07202a 0%,
        #0b1324 100%
    );
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
    background: linear-gradient(
        90deg,
        var(--primary-start),
        var(--primary-end)
    );

    display: flex;
    flex-direction: column;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: 95%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0 30px;
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    background: linear-gradient(
        90deg,
        #0f766e,
        #0ea5e9
    );

    color: #fff;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar,
.navbar.bg-primary {
    background: linear-gradient(
        90deg,
        var(--primary-start),
        var(--primary-end)
    ) !important;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.navbar .navbar-brand,
.navbar .brand-text {
    color: #fff;
}

.site-header .navbar {
    background: linear-gradient(
        90deg,
        var(--primary-start),
        var(--primary-end)
    );
}

.site-header .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95);
    margin-left: 8px;
}

.site-header .navbar-nav .nav-link.active {
    font-weight: 700;
    color: #fff;
}


/* =========================================================
   BRAND / LOGO
   ========================================================= */

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.brand-logo {
    width: 135px;
    height: 57px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    display: block;
    flex-shrink: 0;
}

.site-header .brand-logo {
    width: 135px;
    height: 57px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.brand-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.nav-links a {
    color: rgba(255, 255, 255, 0.95);
    display: block;
    padding: 8px 0;
}

.nav-links a:hover,
.nav-links a:focus {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.9);
}

.nav-link.active {
    color: #fff;
    border-bottom-color: #fff;
    font-weight: 700;
}


/* =========================================================
   ADMIN BUTTON
   ========================================================= */

.btn-admin {
    background: #059669;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-block;
}

.btn-admin:hover {
    transform: translateY(-2px);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    background: #e0f2fe;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    overflow: hidden;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.2;
}

.hero p {
    margin-bottom: 10px;
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn {
    display: inline-block;
    background: #0d9488;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease,
        background 0.1s ease;

    max-width: 100%;
    text-align: center;
    vertical-align: middle;
}

.btn-primary {
    background: #0ea5e9;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.25);
}

.btn-outline {
    background: transparent;
    color: #0ea5e9;
    border: 1px solid #0ea5e9;
}

.btn-outline:hover {
    color: #0b8ad1;
    border-color: #0b8ad1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.btn-secondary {
    background: #0ea5e9;
}

.btn-small {
    padding: 6px 10px;
    font-size: 13px;
}


/* =========================================================
   GRID
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(260px, 1fr)
    );
    gap: 16px;
}


/* =========================================================
   CARD
   ========================================================= */

.card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.08);
    border: 1px solid #e2e8f0;

    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease,
        border-color 0.1s ease;

    min-width: 0;
    overflow-wrap: anywhere;
}

.card h3 {
    margin-top: 0;
    line-height: 1.35;
}

.card p {
    overflow-wrap: anywhere;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.12);
    border-color: #cbd5e1;
}

.card-muted {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

.section-title {
    margin: 26px 0 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}


/* =========================================================
   TABLE
   ========================================================= */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
}


/* =========================================================
   TABLE SCROLL
   ========================================================= */

.table-scroll {
    max-height: 65vh;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   BADGE
   ========================================================= */

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: #e0f2fe;
    color: #0ea5e9;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.badge-outline {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
}

.badge-soft {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0ea5e9;
    font-weight: 700;
    font-size: 12px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
textarea,
input[type="password"],
select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    font-size: 14px;
    background: #fff;
    color: #1f2933;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}


/* =========================================================
   CHECKBOX
   ========================================================= */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(240px, 1fr)
    );
    gap: 8px;
}

.checkbox-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;

    display: flex;
    align-items: flex-start;
    gap: 7px;

    min-width: 0;
    line-height: 1.45;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.checkbox-item:hover {
    background: #f8fafc;
    border-color: #bae6fd;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    padding: 16px 0;
    text-align: center;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}


/* =========================================================
   ALERT
   ========================================================= */

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

.alert-success {
    background: #ecfdf3;
    color: #15803d;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
}


/* =========================================================
   DISCLAIMER
   ========================================================= */

.disclaimer {
    font-size: 13px;
    color: #475569;
    margin: 8px 0 0;
}


/* =========================================================
   ACCORDION
   ========================================================= */

.accordion {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.accordion summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 700;
    background: #f8fafc;
}

.accordion .accordion-body {
    padding: 12px 16px 16px;
}


/* =========================================================
   TAG / PILL
   ========================================================= */

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0f172a;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid #cbd5e1;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.breadcrumb {
    color: #6b7280;
    font-size: 13px;
    margin: -4px 0 8px;
    overflow-wrap: anywhere;
}


/* =========================================================
   PREVIEW
   ========================================================= */

.preview-box {
    border: 1px dashed #cbd5e1;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}


/* =========================================================
   ADMIN LAYOUT
   ========================================================= */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #0f172a;
    color: #fff;
    padding: 18px;
}

.sidebar a {
    color: #e2e8f0;
    display: block;
    padding: 8px 0;
}

.content {
    padding: 20px;
    min-width: 0;
}

.sidebar-group {
    margin-bottom: 18px;
}

.sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a3b8;
    margin: 4px 0 6px;
}

.sidebar a.active {
    color: #fff;
    font-weight: 700;
    border-left: 3px solid #38bdf8;
    padding-left: 9px;
}


/* =========================================================
   STATISTICS
   ========================================================= */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(220px, 1fr)
    );
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 10px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;

    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        border-color 0.12s ease;

    min-width: 0;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
}

.stat-icon.gj {
    background: #dbeafe;
}

.stat-icon.py {
    background: #dcfce7;
}

.stat-icon.rl {
    background: #fef9c3;
}

.stat-icon.rh {
    background: #ffe4e6;
}

.stat-card h3 {
    font-size: 24px;
    margin: 2px 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}


/* =========================================================
   QUICK ACTIONS
   ========================================================= */

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}


/* =========================================================
   SUMMARY LIST
   ========================================================= */

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;

    overflow-wrap: anywhere;
}

.summary-bullet {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0ea5e9;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.page-header h2 {
    margin: 0;
    font-size: 26px;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* =========================================================
   COLLAPSE
   ========================================================= */

.collapse-toggle {
    background: #e0f2fe;
    border: 1px solid #bfdbfe;
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.collapse-toggle:hover {
    background: #dbeafe;
}


/* =========================================================
   INFO BOX
   ========================================================= */

.info-box {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    color: #475569;
    margin-bottom: 12px;

    overflow-wrap: anywhere;
}


/* =========================================================
   TOKEN
   ========================================================= */

.token-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #0ea5e9;
    color: #fff;
    font-family: "Courier New", monospace;
    font-size: 13px;
    letter-spacing: 0.5px;

    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
}


/* =========================================================
   FIELD ERROR
   ========================================================= */

.field-error {
    font-size: 12px;
    color: #b91c1c;
    margin-top: 4px;
    min-height: 16px;
}

.input-invalid {
    border-color: #fca5a5 !important;
    background: #fff7f7 !important;
}


/* =========================================================
   ACCORDION INLINE
   ========================================================= */

.accordion-inline {
    margin-top: 12px;
}

.accordion-toggle {
    width: 100%;
    background: rgba(14, 165, 233, 0.12);
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.accordion-panel {
    display: none;
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.25);
    background: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
}

.accordion-panel.open {
    display: block;
}


/* =========================================================
   MICROCOPY
   ========================================================= */

.microcopy {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}


/* =========================================================
   RBAC
   ========================================================= */

.badge-rbac {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-align: right;
}


/* =========================================================
   LINE CLAMP
   ========================================================= */

.line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* =========================================================
   RESPONSIVE TABLET
   769px - 992px
   ========================================================= */

@media (max-width: 992px) {

    .container {
        width: 94%;
    }

    .hero h1 {
        font-size: 30px;
    }

    .grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .checkbox-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .admin-layout {
        grid-template-columns: 190px 1fr;
    }

    .content {
        padding: 16px;
    }
}


/* =========================================================
   RESPONSIVE MOBILE
   <= 768px
   ========================================================= */

@media (max-width: 768px) {

    /* -----------------------------
       GLOBAL MOBILE
       ----------------------------- */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 10px 12px 24px;
    }


    /* -----------------------------
       HEADER
       ----------------------------- */

    header {
        position: static;
        padding: 8px 10px;
    }

    .navbar {
        gap: 8px;
    }

    .brand-block {
        gap: 8px;
        max-width: calc(100% - 55px);
    }

    .brand-logo {
        width: 92px;
        height: 48px;
    }

    .site-header .brand-logo {
        width: 92px;
        height: 48px;
    }

    .brand-title {
        font-size: 16px;
        line-height: 1.25;
    }

    .brand-subtitle {
        display: none;
    }


    /* -----------------------------
       NAVIGATION
       ----------------------------- */

    .nav-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .nav-links a {
        padding: 8px 4px;
        font-size: 14px;
    }

    .site-header .navbar-nav .nav-link {
        margin-left: 0;
        padding: 8px 4px;
    }


    /* -----------------------------
       HERO
       ----------------------------- */

    .hero {
        padding: 18px 15px;
        margin: 12px 0 18px;
        border-radius: 12px;
        gap: 10px;
    }

    .hero h1 {
        font-size: 25px;
        line-height: 1.25;
        margin-bottom: 9px;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.6;
    }

    .hero .badge {
        font-size: 11px;
        line-height: 1.4;
    }

    .hero .disclaimer {
        font-size: 12px;
        line-height: 1.5;
    }


    /* -----------------------------
       HOME BUTTONS
       ----------------------------- */

    .hero .btn {
        display: block;
        width: 100%;
        margin: 8px 0 0 !important;
        padding: 11px 12px;
    }


    /* -----------------------------
       SECTION TITLE
       ----------------------------- */

    .section-title {
        margin: 22px 0 10px;
        font-size: 21px;
        line-height: 1.35;
    }


    /* -----------------------------
       GRID
       ----------------------------- */

    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }


    /* -----------------------------
       CARD
       ----------------------------- */

    .card {
        width: 100%;
        max-width: 100%;
        padding: 14px;
        border-radius: 10px;
    }

    .card h3 {
        font-size: 18px;
        line-height: 1.35;
    }

    .card p {
        font-size: 14px;
        line-height: 1.6;
    }

    .card .btn {
        margin-top: 6px;
    }


    /* -----------------------------
       DEVELOPER PAGE
       ----------------------------- */

    .summary-list li {
        gap: 8px;
        padding: 9px 0;
        line-height: 1.55;
    }

    .summary-bullet {
        width: 19px;
        height: 19px;
        min-width: 19px;
    }


    /* -----------------------------
       FORM
       ----------------------------- */

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 14px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
        padding: 11px 12px;
        border-radius: 9px;
    }

    textarea {
        min-height: 120px;
    }


    /* -----------------------------
       DIAGNOSIS CHECKBOX
       ----------------------------- */

    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .checkbox-item {
        min-height: 46px;
        padding: 11px 10px;
        font-size: 14px;
        line-height: 1.5;
    }

    .checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 2px;
    }


    /* -----------------------------
       DIAGNOSIS SELECTED COUNT
       ----------------------------- */

    .form-group[style*="display:flex"] {
        flex-wrap: wrap;
        align-items: center !important;
        gap: 8px !important;
    }


    /* -----------------------------
       BUTTON
       ----------------------------- */

    .btn {
        padding: 10px 13px;
        font-size: 14px;
        border-radius: 8px;
    }

    form .btn-primary {
        width: 100%;
    }


    /* -----------------------------
       DIAGNOSIS RESULT
       ----------------------------- */

    .alert {
        padding: 11px 12px;
        font-size: 14px;
        line-height: 1.5;
    }

    code {
        overflow-wrap: anywhere;
        word-break: break-all;
    }


    /* -----------------------------
       RESULT ACTION BUTTONS
       ----------------------------- */

    #history-token {
        display: block;
        margin: 7px 0;
        width: 100%;
        max-width: 100%;
    }

    .card p .btn {
        margin-top: 6px;
    }


    /* -----------------------------
       TABLE
       ----------------------------- */

    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .table th,
    .table td {
        padding: 8px 9px;
        font-size: 13px;
    }

    .table-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }


    /* -----------------------------
       HISTORY SEARCH
       ----------------------------- */

    .info-box {
        padding: 11px;
        font-size: 13px;
        line-height: 1.55;
    }

    .info-box ul {
        margin-left: 17px !important;
    }

    .token-pill {
        max-width: 100%;
        font-size: 12px;
        padding: 6px 8px;
        word-break: break-all;
    }

    .btn-small {
        font-size: 12px;
        padding: 6px 9px;
    }


    /* -----------------------------
       HISTORY SEARCH FORM
       ----------------------------- */

    .card form .form-group > div[style*="display:flex"] {
        display: flex !important;
        flex-direction: column;
        gap: 8px !important;
    }

    .card form .form-group > div[style*="display:flex"] input {
        min-width: 0 !important;
        width: 100%;
        flex: none !important;
    }

    .card form .form-group > div[style*="display:flex"] .btn {
        width: 100%;
    }


    /* -----------------------------
       HISTORY TABLE ACTION
       ----------------------------- */

    .table .btn {
        white-space: nowrap;
    }


    /* -----------------------------
       INFO PAGE FILTER
       ----------------------------- */

    .card > div[style*="display:flex"] {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .card > div[style*="display:flex"] select {
        width: 100%;
        max-width: 100% !important;
    }

    .badge-outline {
        max-width: 100%;
        width: fit-content;
    }


    /* -----------------------------
       INFO DETAIL
       ----------------------------- */

    .breadcrumb {
        font-size: 12px;
        line-height: 1.4;
    }

    .card + h3,
    h3.section-title {
        line-height: 1.35;
    }


    /* -----------------------------
       ADMIN
       ----------------------------- */

    .admin-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .sidebar {
        padding: 14px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .sidebar-group {
        margin-bottom: 10px;
        min-width: 140px;
    }

    .content {
        padding: 12px;
        min-width: 0;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 13px;
    }

    .stat-card h3 {
        font-size: 22px;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
    }


    /* -----------------------------
       PAGE HEADER
       ----------------------------- */

    .page-header h2 {
        font-size: 22px;
        line-height: 1.3;
    }

    .page-header-actions {
        flex-direction: column;
    }

    .page-header-actions .btn {
        width: 100%;
    }


    /* -----------------------------
       ACCORDION
       ----------------------------- */

    .accordion summary {
        padding: 11px 12px;
        font-size: 14px;
    }

    .accordion .accordion-body {
        padding: 11px 12px 14px;
    }


    /* -----------------------------
       FOOTER
       ----------------------------- */

    footer {
        padding: 14px 12px;
        font-size: 12px;
        line-height: 1.5;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   <= 480px
   ========================================================= */

@media (max-width: 480px) {

    .container {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    header {
        padding: 7px 8px;
    }

    .brand-block {
        gap: 6px;
    }

    .brand-logo,
    .site-header .brand-logo {
        width: 78px;
        height: 44px;
    }

    .brand-title {
        font-size: 14px;
    }

    .hero {
        padding: 15px 13px;
        border-radius: 10px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 13px;
    }

    .section-title {
        font-size: 19px;
    }

    .card {
        padding: 12px;
    }

    .card h3 {
        font-size: 17px;
    }

    .card p {
        font-size: 13px;
    }

    .badge,
    .badge-outline,
    .badge-soft {
        font-size: 11px;
    }

    .checkbox-item {
        padding: 10px;
        font-size: 13px;
    }

    .btn {
        font-size: 13px;
        padding: 9px 11px;
    }

    .table th,
    .table td {
        font-size: 12px;
        padding: 7px 8px;
    }

    .token-pill {
        font-size: 11px;
    }

    .summary-list li {
        font-size: 13px;
    }

    .summary-bullet {
        width: 18px;
        height: 18px;
        min-width: 18px;
        font-size: 10px;
    }
}


/* =========================================================
   EXTRA SMALL PHONE
   <= 360px
   ========================================================= */

@media (max-width: 360px) {

    .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .brand-logo,
    .site-header .brand-logo {
        width: 68px;
        height: 40px;
    }

    .brand-title {
        font-size: 13px;
    }

    .hero {
        padding: 13px 11px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .card {
        padding: 11px;
    }

    .btn {
        width: 100%;
    }

    .btn-small {
        width: auto;
    }

    .table th,
    .table td {
        font-size: 11px;
        padding: 6px 7px;
    }
}


/* =========================================================
   PRINT
   ========================================================= */

@media print {

    header,
    footer,
    .nav-links,
    .btn,
    button {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
