/* Font Face - Outfit */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/outfit/QGYvz_MVcBeNP4NJtEtq.woff2') format('woff2');
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/outfit/QGYvz_MVcBeNP4NJuktqQ4E.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}

/*
 * un-iko.it Admin Dashboard Stylesheet
 * Dark sidebar (#132744) with clean, professional layout
 * Self-contained, Bootstrap 5-inspired utilities
 *
 * Table of Contents:
 *  1. CSS Variables
 *  2. Reset & Base
 *  3. Admin Layout
 *  4. Sidebar
 *  5. Topbar
 *  6. Content Area
 *  7. Cards & Panels
 *  8. Tables
 *  9. Forms
 * 10. Buttons
 * 11. Badges & Status
 * 12. Pagination
 * 13. Alerts & Notifications
 * 14. Stats / Dashboard Widgets
 * 15. Breadcrumbs
 * 16. Modal
 * 17. Dropdowns
 * 18. Tabs
 * 19. Image Upload
 * 20. Utilities
 * 21. Responsive
 */


/* ==========================================================================
   1. CSS Variables
   ========================================================================== */

:root {
    --admin-font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --admin-sidebar-width: 260px;
    --admin-sidebar-collapsed-width: 70px;
    --admin-topbar-height: 64px;
    --admin-sidebar-bg: #132744;
    --admin-sidebar-bg-hover: rgba(255, 255, 255, 0.08);
    --admin-sidebar-bg-active: rgba(255, 255, 255, 0.12);
    --admin-sidebar-text: rgba(255, 255, 255, 0.7);
    --admin-sidebar-text-active: #ffffff;
    --admin-sidebar-border: rgba(255, 255, 255, 0.08);
    --admin-topbar-bg: #ffffff;
    --admin-topbar-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --admin-body-bg: #f0f2f5;
    --admin-card-bg: #ffffff;
    --admin-text: #1d2128;
    --admin-text-secondary: #7c818b;
    --admin-text-muted: #abb0b9;
    --admin-border: #e2e6ea;
    --admin-border-light: #f0f2f5;
    --admin-primary: #c4f042;
    --admin-primary-dark: hsl(75, 82%, 51%);
    --admin-primary-text: #1d2128;
    --admin-info: #3449ca;
    --admin-success: #3fb981;
    --admin-warning: #ff9e20;
    --admin-danger: #ff311c;
    --admin-radius: 8px;
    --admin-radius-sm: 4px;
    --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --admin-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --admin-transition: 0.2s ease;
}


/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

.admin-page {
    font-family: var(--admin-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--admin-text);
    background-color: var(--admin-body-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.admin-page a {
    color: var(--admin-info);
    text-decoration: none;
    transition: color var(--admin-transition);
}

.admin-page a:hover {
    color: #2e3fa3;
}

.admin-page img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================================
   3. Admin Layout
   ========================================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--admin-transition);
}

.admin-content {
    flex: 1;
    padding: 24px;
}

.admin-content__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-content__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.admin-content__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ==========================================================================
   4. Sidebar
   ========================================================================== */

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--admin-sidebar-width);
    height: 100vh;
    background-color: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: width var(--admin-transition);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    display: flex;
    flex-direction: column;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* Sidebar Logo */
.admin-sidebar__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px;
    height: var(--admin-topbar-height);
    border-bottom: 1px solid var(--admin-sidebar-border);
    /* Etichette lunghe come "Area Fornitore" andavano a capo: qui si resta
       sempre su una riga e il logo cede spazio al testo. */
    flex-wrap: nowrap;
    overflow: hidden;
}

.admin-sidebar__logo img {
    height: auto;
    max-height: 32px;
    max-width: 110px;
    width: auto;
    object-fit: contain;
    flex-shrink: 1;
    min-width: 0;
}

.admin-sidebar__logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* Etichetta del ruolo accanto al logo ("Admin", "Area Fornitore").
   Senza regola propria ereditava il colore dei link (--admin-info), che sulla
   barra navy risultava illeggibile: verde brand, ben leggibile su quel fondo. */
.admin-sidebar__logo span {
    color: var(--admin-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;   /* il testo non si comprime: a cedere e' il logo */
}

/* Sidebar Navigation */
.admin-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    height: var(--admin-topbar-height);
    border-bottom: 1px solid var(--admin-sidebar-border);
}

.admin-sidebar__close {
    display: none;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--admin-sidebar-text);
    font-size: 1.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.admin-sidebar__nav {
    padding: 12px 0;
    flex: 1;
}

.admin-sidebar__nav ul {
    list-style: none;
    margin: 0;
    padding: 0 8px;
}

.admin-sidebar__nav li {
    margin-bottom: 2px;
}

.admin-sidebar__nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--admin-sidebar-text);
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--admin-transition);
    position: relative;
}

.admin-sidebar__nav li a:hover {
    background-color: var(--admin-sidebar-bg-hover);
    color: var(--admin-sidebar-text-active);
}

.admin-sidebar__nav li a.active {
    background-color: var(--admin-sidebar-bg-active);
    color: var(--admin-sidebar-text-active);
    font-weight: 500;
}

.admin-sidebar__nav li a.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background-color: var(--admin-primary);
    border-radius: 0 3px 3px 0;
}

.admin-sidebar__nav li a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.admin-sidebar__nav li a.active svg {
    opacity: 1;
}

.admin-nav-badge {
    margin-left: auto;
    background: #c4f042;
    color: #132744;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0 6px;
}

/* Nav dividers and labels */
.admin-nav-divider {
    height: 1px;
    background-color: var(--admin-sidebar-border);
    margin: 12px 0;
}

.admin-nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    padding: 8px 12px 4px;
}

/* Sidebar footer */
.admin-sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--admin-sidebar-border);
}

.admin-sidebar__footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-sidebar-text);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: color var(--admin-transition);
}

.admin-sidebar__footer a:hover {
    color: var(--admin-sidebar-text-active);
}

.admin-sidebar__footer a svg {
    flex-shrink: 0;
}


/* ==========================================================================
   5. Topbar
   ========================================================================== */

.admin-topbar {
    position: sticky;
    top: 0;
    height: var(--admin-topbar-height);
    background-color: var(--admin-topbar-bg);
    box-shadow: var(--admin-topbar-shadow);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 90;
}

.admin-topbar__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-topbar__toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--admin-text);
    cursor: pointer;
    border-radius: 6px;
    transition: background-color var(--admin-transition);
}

.admin-topbar__toggle:hover {
    background-color: var(--admin-border-light);
}

.admin-topbar__toggle svg {
    width: 24px;
    height: 24px;
}

.admin-topbar__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Topbar search */
.admin-topbar__search {
    position: relative;
    width: 280px;
}

.admin-topbar__search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 40px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--admin-text);
    background-color: var(--admin-border-light);
    outline: none;
    transition: all var(--admin-transition);
}

.admin-topbar__search input:focus {
    background-color: #fff;
    border-color: var(--admin-info);
    box-shadow: 0 0 0 3px rgba(52, 73, 202, 0.1);
}

.admin-topbar__search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--admin-text-muted);
}

/* Topbar notification */
.admin-topbar__notification {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--admin-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--admin-transition);
}

.admin-topbar__notification:hover {
    background-color: var(--admin-border-light);
    color: var(--admin-text);
}

.admin-topbar__notification svg {
    width: 20px;
    height: 20px;
}

.admin-topbar__notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--admin-danger);
    border: 2px solid var(--admin-topbar-bg);
}

/* Topbar user avatar */
.admin-topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color var(--admin-transition);
}

.admin-topbar__user:hover {
    background-color: var(--admin-border-light);
}

.admin-topbar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--admin-border-light);
}

.admin-topbar__user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--admin-text);
}

.admin-topbar__user-role {
    font-size: 0.6875rem;
    color: var(--admin-text-muted);
}


/* ==========================================================================
   6. Content Area
   ========================================================================== */

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-page-header__title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.admin-page-header__subtitle {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    margin-top: 4px;
}


/* ==========================================================================
   7. Cards & Panels
   ========================================================================== */

.admin-card {
    background-color: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}

.admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border-light);
}

.admin-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.admin-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-card__body {
    padding: 20px;
}

.admin-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--admin-border-light);
    background-color: var(--admin-border-light);
}

/* Compact card variant */
.admin-card--compact .admin-card__header {
    padding: 12px 16px;
}

.admin-card--compact .admin-card__body {
    padding: 16px;
}

/* Card with no header border */
.admin-card--flat .admin-card__header {
    border-bottom: none;
}


/* ==========================================================================
   8. Tables
   ========================================================================== */

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

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--admin-text-secondary);
    background-color: var(--admin-border-light);
    border-bottom: 1px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--admin-text);
    border-bottom: 1px solid var(--admin-border-light);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color var(--admin-transition);
}

.admin-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sortable columns */
.admin-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.admin-table th.sortable:hover {
    color: var(--admin-text);
}

.admin-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid currentColor;
    opacity: 0.3;
    vertical-align: middle;
}

.admin-table th.sorted-asc::after {
    opacity: 1;
    border-bottom: 4px solid currentColor;
    border-top: none;
}

.admin-table th.sorted-desc::after {
    opacity: 1;
    border-top: 4px solid currentColor;
    border-bottom: none;
}

/* Table checkbox */
.admin-table .table-check {
    width: 40px;
}

.admin-table .table-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--admin-primary);
    cursor: pointer;
}

/* Table actions */
.admin-table .table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-table .table-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--admin-text-secondary);
    cursor: pointer;
    border-radius: var(--admin-radius-sm);
    transition: all var(--admin-transition);
}

.admin-table .table-action-btn:hover {
    background-color: var(--admin-border-light);
    color: var(--admin-text);
}

.admin-table .table-action-btn--danger:hover {
    background-color: rgba(255, 49, 28, 0.08);
    color: var(--admin-danger);
}

.admin-table .table-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Table image */
.admin-table .table-image {
    width: 48px;
    height: 48px;
    border-radius: var(--admin-radius-sm);
    object-fit: cover;
    background-color: var(--admin-border-light);
}

/* Empty state */
.admin-table-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--admin-text-muted);
}

.admin-table-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.admin-table-empty__title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--admin-text-secondary);
    margin-bottom: 4px;
}


/* ==========================================================================
   9. Forms
   ========================================================================== */

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--admin-text);
    margin-bottom: 6px;
}

.admin-form-label .required {
    color: var(--admin-danger);
}

.admin-form-hint {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    margin-top: 4px;
}

.admin-form-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-family: var(--admin-font);
    color: var(--admin-text);
    background-color: #fff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    outline: none;
    transition: all var(--admin-transition);
}

.admin-form-control:focus {
    border-color: var(--admin-info);
    box-shadow: 0 0 0 3px rgba(52, 73, 202, 0.1);
}

.admin-form-control::placeholder {
    color: var(--admin-text-muted);
}

.admin-form-control.is-invalid {
    border-color: var(--admin-danger);
}

.admin-form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 49, 28, 0.1);
}

textarea.admin-form-control {
    height: auto;
    min-height: 100px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}

select.admin-form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237c818b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Form row (inline fields) */
.admin-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.admin-form-row--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Switch / Toggle */
.admin-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.admin-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-switch__track {
    width: 40px;
    height: 22px;
    background-color: var(--admin-border);
    border-radius: 11px;
    position: relative;
    transition: background-color var(--admin-transition);
}

.admin-switch__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform var(--admin-transition);
}

.admin-switch input:checked + .admin-switch__track {
    background-color: var(--admin-success);
}

.admin-switch input:checked + .admin-switch__track::after {
    transform: translateX(18px);
}

.admin-switch__label {
    font-size: 0.875rem;
    color: var(--admin-text);
}


/* ==========================================================================
   10. Buttons
   ========================================================================== */

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--admin-font);
    border-radius: var(--admin-radius-sm);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--admin-transition);
    text-decoration: none;
    line-height: 1;
}

.admin-btn svg {
    width: 16px;
    height: 16px;
}

.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary */
.admin-btn--primary {
    background-color: var(--admin-primary);
    color: var(--admin-primary-text);
}

.admin-btn--primary:hover {
    background-color: var(--admin-primary-dark);
}

/* Secondary */
.admin-btn--secondary {
    background-color: var(--admin-sidebar-bg);
    color: #fff;
}

.admin-btn--secondary:hover {
    background-color: #1a3558;
    color: #fff;
}

/* Outline */
.admin-btn--outline {
    background-color: transparent;
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.admin-btn--outline:hover {
    background-color: var(--admin-border-light);
    border-color: var(--admin-text-secondary);
    color: var(--admin-text);
}

/* Ghost */
.admin-btn--ghost {
    background-color: transparent;
    color: var(--admin-text-secondary);
}

.admin-btn--ghost:hover {
    background-color: var(--admin-border-light);
    color: var(--admin-text);
}

/* Danger */
.admin-btn--danger {
    background-color: var(--admin-danger);
    color: #fff;
}

.admin-btn--danger:hover {
    background-color: #e02b17;
    color: #fff;
}

/* Success */
.admin-btn--success {
    background-color: var(--admin-success);
    color: #fff;
}

.admin-btn--success:hover {
    background-color: #36a673;
    color: #fff;
}

/* Small */
.admin-btn--sm {
    height: 32px;
    padding: 0 12px;
    font-size: 0.8125rem;
}

/* Large */
.admin-btn--lg {
    height: 48px;
    padding: 0 24px;
    font-size: 1rem;
}

/* Block */
.admin-btn--block {
    display: flex;
    width: 100%;
}

/* Icon only */
.admin-btn--icon {
    width: 40px;
    padding: 0;
    min-width: 0;
}

.admin-btn--icon.admin-btn--sm {
    width: 32px;
}

/* Button group */
.admin-btn-group {
    display: flex;
}

.admin-btn-group .admin-btn {
    border-radius: 0;
}

.admin-btn-group .admin-btn:first-child {
    border-radius: var(--admin-radius-sm) 0 0 var(--admin-radius-sm);
}

.admin-btn-group .admin-btn:last-child {
    border-radius: 0 var(--admin-radius-sm) var(--admin-radius-sm) 0;
}

.admin-btn-group .admin-btn + .admin-btn {
    margin-left: -1px;
}


/* ==========================================================================
   11. Badges & Status
   ========================================================================== */

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.admin-badge--primary {
    background-color: rgba(196, 240, 66, 0.15);
    color: hsl(75, 76%, 42%);
}

.admin-badge--info {
    background-color: rgba(52, 73, 202, 0.1);
    color: var(--admin-info);
}

.admin-badge--success {
    background-color: rgba(63, 185, 129, 0.1);
    color: var(--admin-success);
}

.admin-badge--warning {
    background-color: rgba(255, 158, 32, 0.1);
    color: var(--admin-warning);
}

.admin-badge--danger {
    background-color: rgba(255, 49, 28, 0.1);
    color: var(--admin-danger);
}

.admin-badge--secondary {
    background-color: rgba(124, 129, 139, 0.1);
    color: var(--admin-text-secondary);
}

/* Dot status indicator */
.admin-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
}

.admin-status-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-status-dot--active::before { background-color: var(--admin-success); }
.admin-status-dot--inactive::before { background-color: var(--admin-text-muted); }
.admin-status-dot--pending::before { background-color: var(--admin-warning); }
.admin-status-dot--error::before { background-color: var(--admin-danger); }
.admin-status-dot--hidden::before { background-color: #f97316; }

/* Status select (product form) */
.admin-status-select {
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    border: 2px solid;
    transition: border-color .2s, background-color .2s, color .2s;
}
.admin-status-select.is-published {
    border-color: var(--admin-success);
    background-color: #ecfdf5;
    color: #065f46;
}
.admin-status-select.is-hidden {
    border-color: #fb923c;
    background-color: #fff7ed;
    color: #9a3412;
}
.admin-status-select.is-draft {
    border-color: var(--admin-warning);
    background-color: #fffbeb;
    color: #92400e;
}


/* ==========================================================================
   12. Pagination
   ========================================================================== */

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.admin-pagination__info {
    font-size: 0.8125rem;
    color: var(--admin-text-secondary);
}

.admin-pagination__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--admin-text-secondary);
    background-color: transparent;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    cursor: pointer;
    transition: all var(--admin-transition);
    text-decoration: none;
}

.admin-pagination__item:hover {
    border-color: var(--admin-text-secondary);
    color: var(--admin-text);
}

.admin-pagination__item.active {
    background-color: var(--admin-sidebar-bg);
    border-color: var(--admin-sidebar-bg);
    color: #fff;
}

.admin-pagination__item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}


/* ==========================================================================
   13. Alerts & Notifications
   ========================================================================== */

.admin-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--admin-radius);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.admin-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.admin-alert--success {
    background-color: rgba(63, 185, 129, 0.08);
    border: 1px solid rgba(63, 185, 129, 0.2);
    color: var(--admin-success);
}

.admin-alert--danger {
    background-color: rgba(255, 49, 28, 0.08);
    border: 1px solid rgba(255, 49, 28, 0.2);
    color: var(--admin-danger);
}

.admin-alert--warning {
    background-color: rgba(255, 158, 32, 0.08);
    border: 1px solid rgba(255, 158, 32, 0.2);
    color: var(--admin-warning);
}

.admin-alert--info {
    background-color: rgba(52, 73, 202, 0.08);
    border: 1px solid rgba(52, 73, 202, 0.2);
    color: var(--admin-info);
}

.admin-alert__close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
}

.admin-alert__close:hover {
    opacity: 1;
}


/* ==========================================================================
   14. Stats / Dashboard Widgets
   ========================================================================== */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background-color: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    padding: 20px;
}

.admin-stat-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.admin-stat-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--admin-radius);
}

.admin-stat-card__icon--primary {
    background-color: rgba(196, 240, 66, 0.15);
    color: hsl(75, 76%, 42%);
}

.admin-stat-card__icon--info {
    background-color: rgba(52, 73, 202, 0.1);
    color: var(--admin-info);
}

.admin-stat-card__icon--success {
    background-color: rgba(63, 185, 129, 0.1);
    color: var(--admin-success);
}

.admin-stat-card__icon--warning {
    background-color: rgba(255, 158, 32, 0.1);
    color: var(--admin-warning);
}

.admin-stat-card__icon svg {
    width: 20px;
    height: 20px;
}

.admin-stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
}

.admin-stat-card__label {
    font-size: 0.8125rem;
    color: var(--admin-text-secondary);
    margin-top: 4px;
}

.admin-stat-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 8px;
}

.admin-stat-card__trend--up {
    color: var(--admin-success);
}

.admin-stat-card__trend--down {
    color: var(--admin-danger);
}


/* ==========================================================================
   15. Breadcrumbs
   ========================================================================== */

.admin-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--admin-text-muted);
    margin-bottom: 8px;
}

.admin-breadcrumbs a {
    color: var(--admin-text-secondary);
}

.admin-breadcrumbs a:hover {
    color: var(--admin-text);
}

.admin-breadcrumbs .separator {
    color: var(--admin-border);
}

.admin-breadcrumbs .current {
    color: var(--admin-text);
    font-weight: 500;
}


/* ==========================================================================
   16. Modal
   ========================================================================== */

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--admin-transition);
}

.admin-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.admin-modal {
    background-color: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--admin-transition);
}

.admin-modal-overlay.is-open .admin-modal {
    transform: scale(1);
}

.admin-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border-light);
}

.admin-modal__title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
}

.admin-modal__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--admin-text-secondary);
    cursor: pointer;
    border-radius: var(--admin-radius-sm);
}

.admin-modal__close:hover {
    background-color: var(--admin-border-light);
}

.admin-modal__body {
    padding: 20px;
}

.admin-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--admin-border-light);
}


/* ==========================================================================
   17. Dropdowns
   ========================================================================== */

.admin-dropdown {
    position: relative;
    display: inline-block;
}

.admin-dropdown__menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background-color: var(--admin-card-bg);
    border: 1px solid var(--admin-border-light);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-md);
    padding: 4px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all var(--admin-transition);
}

.admin-dropdown__menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    color: var(--admin-text);
    border-radius: var(--admin-radius-sm);
    cursor: pointer;
    transition: background-color var(--admin-transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.admin-dropdown__item:hover {
    background-color: var(--admin-border-light);
}

.admin-dropdown__item--danger {
    color: var(--admin-danger);
}

.admin-dropdown__item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.admin-dropdown__divider {
    height: 1px;
    background-color: var(--admin-border-light);
    margin: 4px 0;
}


/* ==========================================================================
   18. Tabs
   ========================================================================== */

.admin-tabs {
    display: flex;
    border-bottom: 2px solid var(--admin-border-light);
    gap: 0;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.admin-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab {
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--admin-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color var(--admin-transition);
}

.admin-tab:hover {
    color: var(--admin-text);
}

.admin-tab.active {
    color: var(--admin-text);
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--admin-sidebar-bg);
}

.admin-tab__count {
    display: inline-block;
    background: var(--admin-border-light);
    color: var(--admin-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 6px;
}

.admin-tab.active .admin-tab__count {
    background: var(--admin-sidebar-bg);
    color: #fff;
}

/* ==========================================================================
   Analytics
   ========================================================================== */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.analytics-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #27ae60;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
    vertical-align: middle;
}

.analytics-bar-item { margin-bottom: 12px; }
.analytics-bar-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 4px; color: var(--admin-text); }
.analytics-bar { height: 8px; background: #ecf0f1; border-radius: 4px; overflow: hidden; }
.analytics-bar-fill { height: 100%; background: var(--admin-sidebar-bg); border-radius: 4px; transition: width 0.5s ease; }

.hourly-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.hourly-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.hourly-bar { width: 100%; min-height: 3px; background: var(--admin-sidebar-bg); border-radius: 3px 3px 0 0; transition: height 0.3s ease; }
.hourly-label { font-size: 0.65rem; color: #7c818b; margin-top: 4px; }

.live-visitor-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.live-visitor-row:last-child { border-bottom: none; }
.live-visitor-page { font-weight: 500; color: #132744; word-break: break-all; font-size: 0.875rem; }
.live-visitor-meta { display: flex; gap: 12px; color: #7c818b; font-size: 0.8125rem; white-space: nowrap; }

@media (max-width: 1024px) {
    [style*="grid-template-columns: 1fr 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}


/* ==========================================================================
   19. Image Upload
   ========================================================================== */

.admin-image-upload {
    border: 2px dashed var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--admin-transition);
}

.admin-image-upload:hover {
    border-color: var(--admin-info);
    background-color: rgba(52, 73, 202, 0.02);
}

.admin-image-upload.is-dragging {
    border-color: var(--admin-info);
    background-color: rgba(52, 73, 202, 0.05);
}

.admin-image-upload svg {
    width: 40px;
    height: 40px;
    color: var(--admin-text-muted);
    margin-bottom: 12px;
}

.admin-image-upload__text {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    margin-bottom: 4px;
}

.admin-image-upload__hint {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}

/* Image preview grid */
.admin-image-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.admin-image-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--admin-radius-sm);
    overflow: hidden;
    border: 1px solid var(--admin-border-light);
}

.admin-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-image-preview__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity var(--admin-transition);
}

.admin-image-preview:hover .admin-image-preview__remove {
    opacity: 1;
}

/* Image sort drag & drop */
.admin-image-sortable .admin-image-preview {
    cursor: grab;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.admin-image-sortable .admin-image-preview:active {
    cursor: grabbing;
}

.admin-image-sortable .admin-image-preview.is-dragging {
    opacity: 0.3;
    transform: scale(0.95);
}

.admin-image-sortable .admin-image-preview.drag-over {
    box-shadow: 0 0 0 2px var(--admin-primary);
    transform: scale(1.05);
}

.admin-image-preview__badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: #c4f042;
    color: #000;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}


/* ==========================================================================
   20. Utilities
   ========================================================================== */

/* Admin text */
.admin-text-muted { color: var(--admin-text-muted); }
.admin-text-secondary { color: var(--admin-text-secondary); }
.admin-text-success { color: var(--admin-success); }
.admin-text-danger { color: var(--admin-danger); }
.admin-text-warning { color: var(--admin-warning); }

/* Admin spacing */
.admin-mb-0 { margin-bottom: 0; }
.admin-mb-sm { margin-bottom: 8px; }
.admin-mb-md { margin-bottom: 16px; }
.admin-mb-lg { margin-bottom: 24px; }
.admin-mt-md { margin-top: 16px; }
.admin-mt-lg { margin-top: 24px; }


/* ==========================================================================
   21. Responsive
   ========================================================================== */

@media (max-width: 1199px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .admin-sidebar__close {
        display: flex;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-topbar__toggle {
        display: flex;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-form-row {
        grid-template-columns: 1fr;
    }

    .admin-form-row--3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .admin-content {
        padding: 16px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-pagination {
        flex-direction: column;
        gap: 12px;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-table {
        font-size: 0.8125rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }

    .admin-modal {
        width: 95%;
        margin: 16px;
    }

    .admin-stat-card__value {
        font-size: 1.5rem;
    }

    .admin-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* ==========================================================================
   22. Area Editor (Product Customization)
   ========================================================================== */

/* Toolbar */
.admin-area-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.admin-area-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.admin-area-step:hover {
    border-color: #9ca3af;
}

.admin-area-step .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-area-step[data-area-step="image"] .dot { background: #3b82f6; }
.admin-area-step[data-area-step="text"] .dot  { background: #ef4444; }
.admin-area-step[data-area-step="logo"] .dot  { background: #22c55e; }

.admin-area-step.is-active {
    background: #f0f7ff;
}
.admin-area-step[data-area-step="image"].is-active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}
.admin-area-step[data-area-step="text"].is-active {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}
.admin-area-step[data-area-step="logo"].is-active {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #15803d;
}

/* Canvas Container */
.admin-area-editor__canvas {
    position: relative;
    display: block;
    width: 100%;
    user-select: none;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.admin-area-editor__canvas img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* Overlay */
.admin-area-overlay {
    position: absolute;
    cursor: move;
    border: 2px dashed;
    border-radius: 3px;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
}

.admin-area-overlay.is-inactive {
    opacity: 0.25;
}

/* Image selector thumbnails */
.admin-area-editor__thumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.admin-area-editor__thumbs-label {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.admin-area-thumb {
    width: 56px;
    height: 56px;
    padding: 2px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
}

.admin-area-thumb:hover {
    border-color: #9ca3af;
}

.admin-area-thumb.is-active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.admin-area-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

/* Label */
.admin-area-overlay__label {
    position: absolute;
    top: 2px;
    left: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 3px;
    line-height: 1.4;
    pointer-events: none;
    white-space: nowrap;
}

/* Resize Handles */
.admin-area-overlay__handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid currentColor;
    border-radius: 2px;
    z-index: 10;
}

.admin-area-overlay__handle--nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}
.admin-area-overlay__handle--ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}
.admin-area-overlay__handle--sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}
.admin-area-overlay__handle--se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

/* Coords Display */
.admin-area-coords {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #4b5563;
    max-width: 700px;
}

.admin-area-coords span {
    display: inline-flex;
    gap: 4px;
}

.admin-area-coords strong {
    color: #111827;
}

/* Shape Selector */
.admin-area-editor__shape-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.admin-area-editor__shape-label {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 500;
    margin-right: 4px;
}

.admin-area-shape {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

.admin-area-shape:hover {
    border-color: #9ca3af;
}

.admin-area-shape.is-active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
}

.admin-area-shape svg {
    flex-shrink: 0;
}

/* Ellipse overlay */
.admin-area-overlay.is-ellipse {
    border-radius: 50%;
}

/* Polygon SVG overlay */
.admin-area-polygon-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.admin-area-polygon-svg polygon {
    pointer-events: visibleFill;
    cursor: move;
}

.admin-area-polygon-svg .polygon-vertex {
    cursor: grab;
    pointer-events: all;
}

.admin-area-polygon-svg .polygon-vertex:active {
    cursor: grabbing;
}

.admin-area-polygon-svg .polygon-label {
    pointer-events: none;
}

/* Polygon hint */
.admin-area-polygon-hint {
    display: none;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px;
    max-width: 700px;
}

.admin-area-polygon-hint.is-visible {
    display: block;
}

/* Info text */
.admin-area-info {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Color mode group */
.admin-color-mode-group {
    margin-top: 8px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.admin-color-mode-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
}

.admin-color-mode-group select {
    margin-top: 4px;
}

/* Mask Preview */
.admin-mask-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.admin-mask-preview img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: repeating-conic-gradient(#d4d4d4 0% 25%, #fff 0% 50%) 50% / 12px 12px;
    display: block;
}

.admin-mask-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.85);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.admin-mask-preview:hover .admin-mask-remove {
    opacity: 1;
}

.admin-mask-remove:hover {
    background: #b91c1c;
}

/* Blend Preview */
.admin-blend-preview {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}

.admin-blend-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-blend-preview__canvas-wrap {
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.admin-blend-preview__canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* =============================================
   LIBRARY ASSETS
   ============================================= */

.library-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.library-asset-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.library-asset-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.library-asset-card__thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-asset-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.library-asset-card__font-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 28px;
    color: #374151;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.library-asset-card__info {
    padding: 6px 8px;
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid #f3f4f6;
}

.library-asset-card__delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.library-asset-card:hover .library-asset-card__delete {
    opacity: 1;
}

.library-asset-card__delete:hover {
    background: #dc2626;
}

/* Library upload area */
.library-upload-area {
    border: 2px dashed var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--admin-transition);
}

.library-upload-area:hover {
    border-color: var(--admin-info);
    background-color: rgba(52, 73, 202, 0.02);
}

.library-upload-area.is-dragover {
    border-color: var(--admin-info);
    background-color: rgba(52, 73, 202, 0.05);
}

.library-upload-area svg {
    width: 40px;
    height: 40px;
    color: var(--admin-text-muted);
    margin-bottom: 12px;
}

.library-upload-area__text {
    font-size: 0.875rem;
    color: var(--admin-text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.library-upload-area.is-uploading {
    opacity: 0.5;
    pointer-events: none;
}

/* Library upload progress bar */
.library-upload-progress {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.library-upload-progress.is-visible {
    display: block;
}

.library-upload-progress__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8125rem;
}

.library-upload-progress__text {
    color: var(--admin-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.library-upload-progress__percent {
    color: var(--admin-text);
    font-weight: 600;
    flex-shrink: 0;
}

.library-upload-progress__track {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.library-upload-progress__bar {
    height: 100%;
    width: 0;
    background: var(--admin-info);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.library-upload-progress__bar.has-errors {
    background: linear-gradient(90deg, var(--admin-info) 0%, #f59e0b 100%);
}

/* Badge variants */
.admin-badge--success {
    background-color: #dcfce7;
    color: #166534;
}

.admin-badge--warning {
    background-color: #fef3c7;
    color: #92400e;
}

.admin-badge--info {
    background-color: #ffedd5;
    color: #9a3412;
}

/* ============================================
   NEWSLETTER
   ============================================ */

/* Progress bar invio */
.nl-progress-bar {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
}

.nl-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #132744, #c4f042);
    border-radius: 12px;
    transition: width 0.3s ease;
    min-width: 0;
}

/* Campaign stats cards */
.nl-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.nl-stat-card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.nl-stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.nl-stat-card__label {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.nl-stat-card__rate {
    font-size: 0.75rem;
    color: var(--color-success);
    margin-top: 2px;
}

/* Send progress */
.nl-send-status {
    text-align: center;
    padding: 40px 20px;
}

.nl-send-status__icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.nl-send-status__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.nl-send-status__text {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.nl-send-status__counter {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 12px;
}

/* Campaign preview iframe */
.nl-preview-frame {
    width: 100%;
    height: 500px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

/* Click stats bar */
.nl-click-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.nl-click-url {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.nl-click-count {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Newsletter campaign send bar */
.nl-campaign-send-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 16px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
}

.nl-campaign-send-bar__info {
    font-size: 0.8125rem;
    color: #166534;
    font-weight: 500;
}

/* Remove padding for newsletter editor */
.admin-content:has(#gjs-nl-editor) {
    padding: 0;
}

@media (max-width: 768px) {
    .nl-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
