/* ============================================================================
   AMI POLBENG — Custom Theme (Argentina Flag Palette)
   Redesign overrides on top of Metronic 8 (Bootstrap 5).
   Loaded AFTER assets/css/style.bundle.css.

   Dark mode reuses Metronic's existing mechanism: [data-bs-theme="dark"]
   on <html> + localStorage("data-bs-theme"). Do NOT introduce data-theme.
   ============================================================================ */

/* ---- Self-hosted font (no FOUT / no external font swap on navigation) ---- */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800; /* variable font — covers all weights */
    /* block: don't paint fallback (Inter) first — avoids the visible "text
       suddenly gets bolder" swap on every navigation. Preloaded + same-origin
       + 27KB, so the wait is imperceptible. */
    font-display: block;
    src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ Tokens */
:root {
    --ami-bg:            #f4f8fc;
    --ami-card:          #ffffff;
    --ami-card2:         #fbfdff;
    --ami-text:          #15222f;
    --ami-muted:         #67788c;
    --ami-line:          #e3ecf5;

    --ami-celeste:       #74ACDF;   /* brand — Argentina celeste          */
    --ami-celeste-strong:#2f7fc2;   /* links / actions                    */
    --ami-celeste-deep:  #1f5f96;   /* link hover                         */
    --ami-celeste-soft:  #eaf3fb;   /* soft accent / hover / badge bg     */

    --ami-gold:          #F6B40E;   /* Sol de Mayo accent                 */
    --ami-gold-soft:     #fdf3d8;
    --ami-gold-text:     #a8770a;

    --ami-danger:        #d9534f;
    --ami-input:         #f4f8fc;

    --ami-shadow:        0 8px 28px rgba(31, 64, 104, .09);
    --ami-shadow-btn:    0 6px 18px rgba(47, 127, 194, .30);
    --ami-glass:         rgba(255, 255, 255, .78);
    --ami-grad:          linear-gradient(135deg, #4a90cf, #2f7fc2);

    /* ---- remap Metronic / Bootstrap core vars to the celeste palette ---- */
    --bs-primary:        #2f7fc2;
    --bs-primary-rgb:    47, 127, 194;
    --bs-primary-active: #1f5f96;
    --bs-primary-light:  #eaf3fb;
    --bs-primary-clarity:rgba(47, 127, 194, .2);
    --bs-primary-inverse:#ffffff;

    --bs-link-color:        #2f7fc2;
    --bs-link-color-rgb:    47, 127, 194;
    --bs-link-hover-color:  #1f5f96;

    --bs-app-bg-color:   #f4f8fc;
    --bs-body-bg:        #f4f8fc;
    --bs-body-color:     #15222f;
    --bs-border-color:   #e3ecf5;

    --bs-card-bg:            #ffffff;
    --bs-card-border-color:  #e3ecf5;
    --bs-card-box-shadow:    0 8px 28px rgba(31, 64, 104, .09);

    --bs-font-sans-serif: "Plus Jakarta Sans", "Inter", Helvetica, "sans-serif";
    --bs-body-font-family: "Plus Jakarta Sans", "Inter", Helvetica, "sans-serif";
}

[data-bs-theme="dark"] {
    --ami-bg:            #0d1520;
    --ami-card:          #151f2d;
    --ami-card2:         #18232f;
    --ami-text:          #e8eef5;
    --ami-muted:         #8da0b5;
    --ami-line:          #233348;

    --ami-celeste-strong:#7db8e8;
    --ami-celeste-deep:  #a9d0f0;
    --ami-celeste-soft:  #1b2c40;
    --ami-gold-soft:     #33290f;
    --ami-input:         #101a26;

    --ami-shadow:        0 8px 28px rgba(0, 0, 0, .35);
    --ami-glass:         rgba(21, 31, 45, .78);

    --bs-primary:        #7db8e8;
    --bs-primary-rgb:    125, 184, 232;
    --bs-primary-active: #a9d0f0;
    --bs-primary-light:  #1b2c40;
    --bs-primary-inverse:#0d1520;

    --bs-link-color:        #7db8e8;
    --bs-link-hover-color:  #a9d0f0;

    --bs-app-bg-color:   #0d1520;
    --bs-body-bg:        #0d1520;
    --bs-body-color:     #e8eef5;
    --bs-border-color:   #233348;

    --bs-card-bg:            #151f2d;
    --bs-card-border-color:  #233348;
    --bs-card-box-shadow:    0 8px 28px rgba(0, 0, 0, .35);
}

/* -------------------------------------------------------------------- Base */
html, body { font-family: var(--bs-body-font-family); }

body,
.app-default,
#kt_app_body { background-color: var(--ami-bg) !important; }

/* Opacity-only on purpose: animating transform/translate here (even fading
   back to "none") leaves the browser reporting a non-"none" computed
   transform (an identity matrix) for the life of the animation, including
   after it finishes with fill-mode both/forwards. Per the CSS Transforms
   spec, ANY non-none transform/translate/rotate/scale on an ancestor
   establishes a new containing block for position:fixed descendants —
   which silently traps every fixed-position modal nested under an element
   using this animation (e.g. .app-container) behind its own backdrop,
   since the backdrop is appended straight to <body> and escapes the trap.
   Found via a live DOM stacking-context audit on the Post module's modal. */
@keyframes amiFadeUp {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.app-content .container-fluid,
.app-content .app-container { animation: amiFadeUp .35s ease both; }

/* ----------------------------------------------------------------- Sidebar */
.app-sidebar {
    background: var(--ami-card) !important;
    border-right: 1px solid var(--ami-line) !important;
}

.app-sidebar-logo {
    border-bottom: 1px solid var(--ami-line);
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    min-height: auto;
}
.app-sidebar-logo a { gap: 10px; }
.app-sidebar-logo img { height: 30px !important; width: auto; }
.app-sidebar-logo h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--ami-text);
}

/* section heading ("MENU") */
.app-sidebar .menu-heading {
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #ffffff !important;
    padding: 4px 12px 8px !important;
    opacity: 1 !important;
}

/* menu items */
.app-sidebar .menu-item .menu-link {
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ami-muted);
    gap: 4px;
}
.app-sidebar .menu-item .menu-link .menu-icon,
.app-sidebar .menu-item .menu-link .menu-icon i,
.app-sidebar .menu-item .menu-link .menu-icon .ki-outline {
    color: var(--ami-muted);
    font-size: 17px;
}
.app-sidebar .menu-item .menu-link:hover,
.app-sidebar .menu-item.hover > .menu-link:not(.disabled):not(.active):not(.here) {
    background: var(--ami-celeste-soft) !important;
    color: var(--ami-celeste-strong) !important;
}
.app-sidebar .menu-item .menu-link:hover .menu-icon i,
.app-sidebar .menu-item .menu-link:hover .menu-title { color: var(--ami-celeste-strong) !important; }

/* active item: celeste-soft bg, celeste text, gold dot on the right */
.app-sidebar .menu-item .menu-link.active {
    background: var(--ami-celeste-soft) !important;
    color: var(--ami-celeste-strong) !important;
    position: relative;
}
.app-sidebar .menu-item .menu-link.active .menu-title,
.app-sidebar .menu-item .menu-link.active .menu-icon i,
.app-sidebar .menu-item .menu-link.active .menu-icon .ki-outline { color: var(--ami-celeste-strong) !important; }
.app-sidebar .menu-item .menu-link.active::after {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ami-gold);
    margin-left: auto;
    flex-shrink: 0;
}

.app-sidebar-footer { border-top: 1px solid var(--ami-line); }

/* ------------------------------------------------------------------ Header */
.app-header {
    background: var(--ami-glass) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ami-line) !important;
    box-shadow: none !important;
}

/* single theme toggle button & notification button */
.ami-theme-toggle {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    width: 38px !important; height: 38px !important; min-width: 38px !important;
    border-radius: 10px !important;
    border: 1px solid var(--ami-line) !important;
    background: var(--ami-card) !important;
    color: var(--ami-muted) !important;
    transition: all .15s ease !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    padding: 0 !important;
}
.ami-theme-toggle:hover,
.ami-theme-toggle.active,
.ami-theme-toggle.show { 
    color: var(--ami-celeste-strong) !important; 
    border-color: var(--ami-celeste) !important;
    background: var(--bs-primary-light, #eaf3fb) !important;
}
.ami-theme-toggle i { font-size: 18px !important; }

/* notification wrapper & badge (prevents any layout shift) */
.ami-notif-wrapper {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    flex-shrink: 0 !important;
}

.ami-notif-dropdown {
    position: absolute !important;
    top: 48px !important;
    right: 0 !important;
    left: auto !important;
    width: 360px !important;
    max-width: calc(100vw - 32px) !important;
    max-height: 480px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid var(--ami-line, #e2e8f0) !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden !important;
    z-index: 1090 !important;
    margin: 0 !important;
    transform: none !important;
}

.ami-notif-badge {
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    background: #EF4444 !important;
    color: #FFFFFF !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid var(--ami-card, #ffffff) !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4) !important;
    line-height: 1 !important;
    pointer-events: none !important;
    z-index: 2 !important;
}
[data-bs-theme="dark"] .ami-notif-badge {
    border-color: var(--ami-card) !important;
}

.ami-notif-item {
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
}
.ami-notif-item:hover {
    background: var(--bs-primary-light, #f0f7fd) !important;
}
[data-bs-theme="dark"] .ami-notif-item:hover {
    background: var(--ami-card2, #18232f) !important;
}

/* user chip (pill) */
.ami-user-chip {
    display: inline-flex !important; align-items: center !important; gap: 8px !important;
    padding: 4px 12px 4px 5px !important;
    border-radius: 999px !important;
    border: 1px solid var(--ami-line) !important;
    background: var(--ami-card) !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
    flex-shrink: 0 !important;
    height: 38px !important;
}
.ami-user-chip:hover,
.ami-user-chip.show { 
    border-color: var(--ami-celeste) !important;
    background: var(--bs-primary-light, #eaf3fb) !important;
}
.ami-user-chip .ami-user-avatar-sm {
    width: 28px !important; height: 28px !important; border-radius: 50% !important;
    background: linear-gradient(135deg, var(--ami-celeste), #2f7fc2) !important;
    color: #fff !important; font-weight: 700 !important; font-size: 11.5px !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}
.ami-user-chip .ami-user-avatar-sm img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.ami-user-chip .ami-user-name { font-size: 13px !important; font-weight: 700 !important; color: var(--ami-text) !important; }

/* --------------------------------------------------- Toolbar (page title) */
.app-toolbar { padding-top: 22px !important; padding-bottom: 4px !important; }
.app-toolbar .page-heading {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--ami-text) !important;
}
.app-toolbar .breadcrumb { font-size: 12.5px; font-weight: 600; }
.app-toolbar .breadcrumb .breadcrumb-item,
.app-toolbar .breadcrumb .breadcrumb-item a { color: var(--ami-muted) !important; }
.app-toolbar .breadcrumb .breadcrumb-item a:hover { color: var(--ami-celeste-strong) !important; }

/* ------------------------------------------------------------------ Footer */
.app-footer {
    background: transparent !important;
    border-top: 1px solid var(--ami-line);
}
.app-footer, .app-footer .text-muted, .app-footer a {
    font-size: 12.5px !important;
    font-weight: 600;
}
.app-footer a { color: var(--ami-celeste-strong) !important; }

/* ------------------------------------------------------------------- Cards */
.card {
    background: var(--ami-card) !important;
    border: 1px solid var(--ami-line) !important;
    border-radius: 20px !important;
    box-shadow: var(--ami-shadow) !important;
}
.card .card-header { border-bottom: 0; }

/* ----------------------------------------------------------------- Buttons */
.btn.btn-primary {
    background: var(--ami-grad) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 11px !important;
    font-weight: 700 !important;
    box-shadow: var(--ami-shadow-btn) !important;
    transition: filter .15s ease;
}
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active { filter: brightness(1.07); color: #fff !important; }

.btn.btn-light-primary,
.btn.btn-active-light-primary {
    background: var(--ami-celeste-soft) !important;
    color: var(--ami-celeste-strong) !important;
    border: none !important;
    border-radius: 11px !important;
    font-weight: 700 !important;
}
.btn.btn-light-primary:hover { filter: brightness(.97); }

/* small outline action buttons inside tables */
.table .btn-group .btn.btn-sm,
.table .btn.btn-icon.btn-sm {
    border: 1px solid var(--ami-line) !important;
    border-radius: 9px !important;
    background: var(--ami-card) !important;
    font-weight: 700;
}
.table .btn-group .btn.btn-light-warning:hover { border-color: var(--ami-celeste) !important; background: var(--ami-celeste-soft) !important; }
.table .btn-group .btn.btn-light-danger:hover  { border-color: var(--ami-danger) !important;  background: rgba(217, 83, 79, .08) !important; }

/* footer "Home" button in sidebar keeps gradient (btn-primary handles it) */

/* ------------------------------------------------------------- Form inputs */
.form-control,
.form-select {
    background: var(--ami-input) !important;
    border: 1px solid var(--ami-line) !important;
    border-radius: 12px !important;
    color: var(--ami-text) !important;
    font-weight: 500;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--ami-celeste) !important;
    box-shadow: 0 0 0 3px var(--ami-celeste-soft) !important;
    background: var(--ami-input) !important;
}
.form-control-solid { background: var(--ami-input) !important; }
.control-label, .form-label { color: var(--ami-text) !important; font-weight: 700 !important; font-size: 13px !important; }

/* validation state */
.form-control.is-invalid,
.form-select.is-invalid,
.is-invalid .select2-selection,
.select2-container.is-invalid .select2-selection { border-color: var(--ami-danger) !important; }
.invalid-feedback, .text-danger { color: var(--ami-danger) !important; }
.invalid-feedback { font-size: 12px; font-weight: 600; }

/* ------------------------------------------------------------------ Select2 */
.select2-container .select2-selection {
    background: var(--ami-input) !important;
    border: 1px solid var(--ami-line) !important;
    border-radius: 12px !important;
    min-height: 46px !important;
    color: var(--ami-text) !important;
    display: flex; align-items: center; flex-wrap: wrap;
    padding: 4px 8px;
}
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
    border-color: var(--ami-celeste) !important;
    box-shadow: 0 0 0 3px var(--ami-celeste-soft) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ami-text) !important; line-height: 36px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }
.select2-selection--multiple .select2-selection__choice {
    background: var(--ami-celeste-soft) !important;
    color: var(--ami-celeste-strong) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600; font-size: 12.5px;
    padding: 3px 9px !important;
    margin: 3px 4px 3px 0 !important;
}
.select2-selection--multiple .select2-selection__choice__remove {
    /* color & background overridden by backend-argentina.css */
    border: none !important;
    margin-right: 5px; font-weight: 700;
}
.select2-selection--multiple .select2-search__field { color: var(--ami-text) !important; }
.select2-dropdown {
    background: var(--ami-card) !important;
    border: 1px solid var(--ami-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--ami-shadow) !important;
    overflow: hidden;
}
.select2-container--default .select2-results__option { color: var(--ami-text); font-size: 13.5px; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
    background: var(--ami-celeste-soft) !important; color: var(--ami-celeste-strong) !important;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
    background: var(--ami-card2) !important; color: var(--ami-celeste-strong) !important;
}
.select2-search--dropdown .select2-search__field {
    border-radius: 8px !important; border: 1px solid var(--ami-line) !important;
    background: var(--ami-input) !important; color: var(--ami-text) !important; padding: 8px 10px;
}

/* ------------------------------------------------------------------ Tables */
.table {
    color: var(--ami-text);
    font-size: 13.5px;
    --bs-table-bg: transparent;
}
.table > thead > tr > th,
.table thead th {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ami-muted) !important;
    border-bottom: 1px solid var(--ami-line) !important;
    padding: 10px 12px;
}
.table.table-row-dashed > tbody > tr { border-bottom: 1px dashed var(--ami-line); }
.table > tbody > tr > td { padding: 14px 12px; vertical-align: middle; }
.table > tbody > tr:hover { background: var(--ami-card2); }

/* DataTables chrome */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.page-item.active .page-link {
    background: var(--ami-grad) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 8px;
}
.page-link { border-radius: 8px; color: var(--ami-celeste-strong); }

/* ------------------------------------------------------------------ Badges */
.badge {
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 11px;
}
.badge.badge-light { background: var(--ami-celeste-soft); color: var(--ami-celeste-strong); }

/* user table enrichment (name avatar + role pill) */
.ami-user { display: inline-flex; align-items: center; gap: 10px; }
.ami-user-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    background: var(--ami-celeste-soft); color: var(--ami-celeste-strong);
    font-weight: 700; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ami-user-name { font-weight: 700; color: var(--ami-text); }
.ami-role-badge {
    display: inline-block; padding: 4px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    background: var(--ami-celeste-soft); color: var(--ami-celeste-strong);
}
.ami-role-badge.is-super { background: var(--ami-gold-soft); color: var(--ami-gold-text); }
.ami-view-badge {
    display: inline-block; padding: 4px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    background: var(--ami-gold-soft); color: var(--ami-gold-text);
}

/* ------------------------------------------------------------------- Modal */
.modal-content {
    background: var(--ami-card) !important;
    border: 1px solid var(--ami-line) !important;
    border-radius: 20px !important;
    box-shadow: var(--ami-shadow) !important;
    overflow: hidden;
    animation: amiFadeUp .3s ease both;
}
.modal-header {
    padding: 20px 26px !important;
    border-bottom: 1px solid var(--ami-line) !important;
}
.modal-title { font-size: 16px !important; font-weight: 800 !important; color: var(--ami-text); }
.modal-body { padding: 24px 26px !important; }
.modal-footer {
    padding: 18px 26px !important;
    border-top: 1px solid var(--ami-line) !important;
}
.modal-body .form-group { margin-bottom: 16px; }
.modal-body .form-group .control-label { display: block; margin-bottom: 7px; font-size: 13px; }
.modal .btn-close:hover { color: var(--ami-danger); }

/* modal footer buttons */
.modal-footer .btn.submit-data {
    background: var(--ami-grad) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 11px !important;
    font-weight: 700 !important;
    box-shadow: var(--ami-shadow-btn) !important;
}
.modal-footer .btn.submit-data:hover { filter: brightness(1.07); }
.modal-footer .btn.btn-secondary {
    background: var(--ami-card) !important;
    border: 1px solid var(--ami-line) !important;
    color: var(--ami-muted) !important;
    border-radius: 11px !important;
    font-weight: 700 !important;
}
.modal-footer .btn.btn-secondary:hover { border-color: var(--ami-muted) !important; }

/* file input styled as dashed celeste dropzone */
.modal-body input[type="file"].form-control {
    border: 1px dashed var(--ami-celeste) !important;
    background: var(--ami-celeste-soft) !important;
}

/* ---------------------------------------------------- Show / Delete content
   (users/roles/berita/logs "show" pages + delete confirmations — all render
   inside a modal-body or a card-body, never their own card chrome) */
.ami-detail-list { display: flex; flex-direction: column; gap: 18px; }
.ami-detail-row .label {
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ami-muted); margin-bottom: 5px;
}
.ami-detail-row .value { font-size: 14px; color: var(--ami-text); line-height: 1.5; }
.ami-detail-row .value.muted,
.ami-detail-row .muted { color: var(--ami-muted); font-weight: 500; }
.ami-detail-row .value img { max-width: 220px; border-radius: 12px; border: 1px solid var(--ami-line); margin-top: 4px; }

.ami-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
@media (max-width: 575.98px) { .ami-detail-grid { grid-template-columns: 1fr; } }

/* JSON / properties block (activity log) */
.ami-json-block {
    background: var(--ami-input); border: 1px solid var(--ami-line); border-radius: 14px;
    padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px; line-height: 1.6; color: var(--ami-text);
    max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}

/* delete confirmation */
.ami-confirm-delete { display: flex; gap: 16px; align-items: flex-start; }
.ami-confirm-delete .icon {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
    background: rgba(217, 83, 79, .1); color: var(--ami-danger);
    display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
}
.ami-confirm-delete .msg-title { font-size: 15px; font-weight: 800; color: var(--ami-text); margin-bottom: 3px; }
.ami-confirm-delete .msg-sub { font-size: 13px; color: var(--ami-muted); }

.ami-delete-preview {
    background: var(--ami-card2); border: 1px solid var(--ami-line); border-radius: 14px;
    padding: 14px 16px; margin-top: 16px; display: flex; flex-direction: column; gap: 8px;
    max-height: 240px; overflow-y: auto;
}
.ami-delete-preview .row { display: flex; gap: 10px; font-size: 13px; }
.ami-delete-preview .row .k { font-weight: 700; color: var(--ami-muted); min-width: 120px; flex-shrink: 0; }
.ami-delete-preview .row .v { color: var(--ami-text); word-break: break-word; }

.ami-warn-banner {
    display: flex; gap: 10px; align-items: center;
    background: var(--ami-gold-soft); color: var(--ami-gold-text);
    border-radius: 11px; padding: 10px 14px; font-size: 12.5px; font-weight: 700; margin-top: 16px;
}

/* ================================================================== LOGIN */
.ami-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.ami-auth-brand {
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 64px;
    background: linear-gradient(160deg, #74ACDF 0%, #4a90cf 55%, #2f6ca6 100%);
}
.ami-auth-brand .circle {
    position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14);
}
.ami-auth-brand .circle-1 { top: -120px; right: -120px; width: 340px; height: 340px; }
.ami-auth-brand .circle-2 { bottom: -80px; left: -80px; width: 260px; height: 260px; background: rgba(255, 255, 255, .08); }
.ami-auth-brand .sol {
    top: 56px; left: 64px; width: 44px; height: 44px; position: absolute; border-radius: 50%;
    background: var(--ami-gold); box-shadow: 0 0 40px 10px rgba(246, 180, 14, .45);
}
.ami-auth-brand img { width: 220px; margin-bottom: 28px; position: relative; }
.ami-auth-brand h2 {
    margin: 0; color: #fff; font-size: 28px; font-weight: 700; line-height: 1.35;
    max-width: 420px; position: relative;
}
.ami-auth-brand p {
    margin: 14px 0 0; color: rgba(255, 255, 255, .75); font-size: 14.5px;
    max-width: 380px; position: relative;
}
.ami-auth-form {
    display: flex; align-items: center; justify-content: center;
    padding: 48px; background: var(--ami-bg);
}
.ami-auth-card {
    width: 100%; max-width: 420px;
    background: var(--ami-card); border: 1px solid var(--ami-line);
    border-radius: 22px; box-shadow: var(--ami-shadow);
    padding: 44px 40px;
    animation: amiFadeUp .4s ease both;
}
.ami-auth-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; color: var(--ami-text); text-align: center; }
.ami-auth-accent {
    height: 3px; width: 44px; margin: 10px auto 12px; border-radius: 2px;
    background: linear-gradient(90deg, var(--ami-celeste), var(--ami-gold));
}
.ami-auth-sub { color: var(--ami-muted); font-size: 13.5px; font-weight: 500; text-align: center; margin-bottom: 30px; }
.ami-auth-card .form-control { padding: 13px 16px; margin-bottom: 14px; }
.ami-auth-card .btn-primary { width: 100%; padding: 13px; margin-top: 8px; font-size: 14.5px; }
.ami-auth-forgot { display: block; text-align: center; font-size: 13px; font-weight: 600; margin-top: 14px; color: var(--ami-celeste-strong); }

/* ============================================================== DASHBOARD */
.ami-hero {
    position: relative; overflow: hidden;
    border-radius: 20px; padding: 36px 40px;
    background: linear-gradient(150deg, #74ACDF, #3a83c4 70%);
    box-shadow: var(--ami-shadow);
    margin-bottom: 20px;
}
.ami-hero .circle { position: absolute; border-radius: 50%; }
.ami-hero .circle-w { top: -90px; right: 60px; width: 230px; height: 230px; background: rgba(255, 255, 255, .12); }
.ami-hero .circle-g { bottom: -110px; right: -40px; width: 240px; height: 240px; background: rgba(246, 180, 14, .25); }
.ami-hero-title { position: relative; color: #fff; font-size: 24px; font-weight: 800; }
.ami-hero-sub   { position: relative; margin-top: 6px; color: rgba(255, 255, 255, .8); font-size: 14px; font-weight: 500; }

.ami-chart-card { padding: 26px 28px; }
.ami-chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.ami-chart-title { font-size: 15.5px; font-weight: 800; color: var(--ami-text); }
.ami-chart-subtitle { margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--ami-muted); }
.ami-legend { display: flex; gap: 14px; font-size: 12px; font-weight: 600; color: var(--ami-muted); }
.ami-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ami-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ami-legend .dot-celeste { background: var(--ami-celeste); }
.ami-legend .dot-gold { background: var(--ami-gold); }

.ami-chart {
    display: flex; align-items: flex-end; gap: 10px; height: 190px;
    padding-top: 8px; border-bottom: 1px solid var(--ami-line);
}
.ami-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.ami-bar {
    width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #8cbce6, #5d9fd6);
    transition: filter .15s ease;
}
.ami-bar:hover { filter: brightness(1.1); }
.ami-bar.is-peak { background: linear-gradient(180deg, #F6B40E, #e0a30c); }
.ami-months { display: flex; gap: 10px; margin-top: 8px; }
.ami-months .m { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: var(--ami-muted); }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 991.98px) {
    .ami-auth { grid-template-columns: 1fr; }
    .ami-auth-brand { display: none; }
    .ami-auth-form { padding: 32px 20px; min-height: 100vh; }
}
