:root {
    --bg: #f5f1e8;
    --surface: #ffffff;
    --surface-alt: #f0e7d6;
    --text: #1f2a30;
    --muted: #5d6a70;
    --line: #d8cdbb;
    --brand: #0e5c57;
    --brand-dark: #083c39;
    --accent: #d98f2b;
    --danger: #a13f32;
    --success: #1a7f4b;
    --shadow: 0 20px 45px rgba(31, 42, 48, 0.08);
    --radius: 20px;
    --radius-sm: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(217, 143, 43, 0.16), transparent 28%),
        linear-gradient(180deg, #fbf8f2 0%, #f5f1e8 100%);
}

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

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

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(251, 248, 242, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(216, 205, 187, 0.8);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 0 1 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    font-weight: 800;
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: transparent;
    border: 0;
    padding: 0;
    flex: 0 0 52px;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand span:last-child {
    min-width: 0;
}

.brand strong {
    font-size: 1.02rem;
    line-height: 1.1;
}

.brand small {
    font-size: 0.78rem;
    line-height: 1.2;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.eyebrow,
.meta-row,
.details-list,
.footer-grid p,
.site-nav a {
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--brand-dark);
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    border: 0;
    padding: 0.95rem 1.35rem;
    font-weight: 700;
    cursor: pointer;
}

.nav-cta,
.button.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
}

.button.secondary {
    background: var(--surface-alt);
    color: var(--brand-dark);
}

.button.small {
    padding: 0.75rem 1rem;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 0.75rem 1rem;
}

.hero,
.section {
    padding: 4.5rem 0;
}

.hero-grid,
.two-column,
.info-grid,
.footer-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-grid {
    grid-template-columns: 1.4fr 0.9fr;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    margin: 0 0 1rem;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    line-height: 0.98;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    margin-bottom: 0.8rem;
}

.hero-copy,
.page-intro p,
.card p,
.form-panel p {
    font-size: 1.04rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-card,
.card,
.flash {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(216, 205, 187, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.card-body,
.info-card,
.form-panel,
.side-panel {
    padding: 1.5rem;
}

.hero-actions,
.stats-row,
.price-row,
.meta-row,
.section-heading,
.filter-bar,
.pill-row {
    display: flex;
    gap: 1rem;
}

.stats-row {
    margin-top: 1.8rem;
    flex-wrap: wrap;
}

.stats-row div {
    min-width: 140px;
}

.stats-row strong {
    display: block;
    font-size: 1.8rem;
    color: var(--brand-dark);
}

.feature-list,
.details-list {
    padding-left: 1.2rem;
}

.section-heading {
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1.5rem;
}

.category-grid,
.product-grid,
.contact-grid {
    display: grid;
    gap: 1.5rem;
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    overflow: hidden;
}

.category-card img,
.card-media img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.placeholder-media {
    height: 240px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #d9d0bf, #efe5d3);
    color: var(--brand-dark);
    font-weight: 700;
}

.pill-row {
    flex-wrap: wrap;
}

.pill {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--brand-dark);
    font-size: 0.86rem;
}

.muted {
    background: rgba(240, 231, 214, 0.5);
}

.text-link {
    color: var(--brand);
    font-weight: 700;
}

.empty-state {
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--line);
    color: var(--muted);
}

.two-column {
    grid-template-columns: 1.25fr 0.75fr;
}

.narrow {
    max-width: 760px;
}

.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 2rem;
}

.filter-bar,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font: inherit;
}

.contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 1.5rem;
}

.site-footer {
    padding: 3.5rem 0 2.4rem;
    border-top: 1px solid rgba(216, 205, 187, 0.8);
    background: linear-gradient(135deg, #083c39 0%, #0e5c57 58%, #163f3b 100%);
    color: #f8faf7;
}

.site-footer .footer-grid {
    grid-template-columns: minmax(260px, 1.25fr) minmax(240px, 1fr) minmax(180px, 0.75fr);
    align-items: start;
    gap: 2rem;
}

.site-footer .footer-grid > div {
    min-width: 0;
}

.site-footer .footer-grid h3,
.site-footer .footer-grid h4 {
    margin-bottom: 0.85rem;
    color: #fff;
    line-height: 1.25;
}

.site-footer .footer-grid h3 {
    font-size: 1.28rem;
}

.site-footer .footer-grid h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-footer .footer-grid p {
    margin-bottom: 0.55rem;
    color: rgba(248, 250, 247, 0.78);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.site-footer .footer-grid a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(217, 143, 43, 0.6);
    text-underline-offset: 0.22em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.site-footer .footer-grid a:hover,
.site-footer .footer-grid a:focus {
    color: #ffd18a;
    text-decoration-color: currentColor;
}

.flash {
    margin: 1rem 0 0;
    padding: 1rem 1.25rem;
}

.flash-success {
    border-left: 5px solid var(--success);
}

.flash-error {
    border-left: 5px solid var(--danger);
}

.admin-body {
    background: #eef2f1;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: linear-gradient(180deg, var(--brand-dark), #0f2f2d);
    color: #fff;
    padding: 2rem 1.25rem;
}

.admin-sidebar a {
    display: block;
    color: rgba(255, 255, 255, 0.84);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.3rem;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-nav-group {
    margin-bottom: 0.35rem;
}

.admin-nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.84);
    cursor: pointer;
}

.admin-submenu {
    display: none;
    padding-left: 0.75rem;
}

.admin-submenu.open {
    display: block;
}

.admin-mobile-bar {
    display: none;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.admin-main {
    padding: 2rem;
}

.admin-topbar,
.summary-grid,
.table-actions,
.upload-dropzone,
.gallery-preview {
    display: flex;
    gap: 1rem;
}

.admin-topbar,
.table-actions {
    justify-content: space-between;
    align-items: center;
}

.summary-grid {
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.summary-card {
    min-width: 190px;
    flex: 1;
}

.summary-card strong {
    display: block;
    font-size: 2rem;
    color: var(--brand-dark);
}

.admin-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.admin-table th,
.admin-table td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid #e5ded2;
    text-align: left;
    vertical-align: top;
}

.table-thumb {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
}

.badge {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--brand-dark);
    font-size: 0.84rem;
    font-weight: 700;
}

.link-button,
.danger-button {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 700;
}

.link-button {
    background: var(--surface-alt);
}

.danger-button {
    background: #f7dbd6;
    color: var(--danger);
}

.secondary-button {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    border: 0;
    background: #dcefeb;
    color: var(--brand-dark);
    cursor: pointer;
}

.upload-dropzone {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border: 2px dashed var(--line);
    border-radius: 18px;
    background: #fcfaf6;
    text-align: center;
    padding: 1.25rem;
}

.upload-dropzone.is-dragover {
    border-color: var(--brand);
    background: #eef7f6;
}

.upload-dropzone input {
    display: none;
}

.preview-image,
.gallery-preview img,
.preview-video,
.gallery-preview video {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
}

.gallery-preview {
    flex-wrap: wrap;
    margin-top: 1rem;
}

.existing-media-grid {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.media-delete-tile {
    display: grid;
    gap: 0.55rem;
    width: 132px;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.media-delete-tile img,
.media-delete-tile video {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
}

.media-delete-tile input {
    width: auto;
    margin-right: 0.25rem;
}

.form-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
}

.form-tabs a {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: #f5efe4;
    color: var(--text);
    font-weight: 800;
}

.form-tabs a.active,
.form-tabs a:focus,
.form-tabs a:hover {
    background: var(--brand);
    color: #fff;
}

.form-tab-panel {
    scroll-margin-top: 1rem;
}

.header-photo-preview {
    margin-top: 1rem;
    overflow-x: auto;
}

.header-photo-preview img {
    display: block;
    width: 760px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.document-link-grid {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.email-compose-card {
    max-width: 860px;
}

.document-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.line-items-table input {
    min-width: 110px;
}

.line-items-table td:first-child input {
    min-width: 240px;
}

.document-summary {
    display: grid;
    gap: 0.6rem;
    justify-content: end;
    margin-top: 1.5rem;
}

.document-summary div {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: 280px;
}

.doc-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.doc-meta {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.doc-section {
    margin-top: 1.5rem;
}

.inline-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.login-card {
    width: min(100%, 460px);
    padding: 2rem;
}

.login-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-logo {
    width: min(180px, 56%);
    height: auto;
}

@media (max-width: 960px) {
    .hero-grid,
    .two-column,
    .footer-grid,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 2.6rem 0 2rem;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.8rem);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .admin-sidebar {
        display: none;
        position: sticky;
        top: 0;
        z-index: 20;
        padding-bottom: 1rem;
    }

    .admin-sidebar.open {
        display: block;
    }

    .admin-mobile-bar {
        display: flex;
    }
}

@media (max-width: 640px) {
    .hero,
    .section {
        padding: 3rem 0;
    }

    h1 {
        line-height: 1.05;
    }

    .admin-main {
        padding: 1rem;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    .admin-sidebar,
    .admin-mobile-bar,
    .admin-topbar,
    .doc-actions,
    .site-header,
    .site-footer {
        display: none !important;
    }

    .admin-shell,
    .admin-main {
        display: block;
        padding: 0;
    }

    .card,
    .admin-card {
        box-shadow: none;
        border: 0;
    }

    .document-brand,
    .doc-meta {
        page-break-inside: avoid;
    }

    .admin-table {
        width: 100%;
        display: table;
        white-space: normal;
    }

    .admin-table th,
    .admin-table td {
        white-space: normal;
    }
}

body {
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Final admin skin layer: keep AdminLTE-style rules above older appended CSS. */
.admin-body {
    --admin-bg: #f4f6f9;
    --admin-surface: #fff;
    --admin-sidebar: #343a40;
    --admin-muted: #6c757d;
    --admin-border: #dee2e6;
    --admin-primary: #0d6efd;
    --admin-danger: #dc3545;
    --admin-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
    background: var(--admin-bg) !important;
    color: #212529 !important;
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif !important;
}

.admin-shell {
    display: grid !important;
    grid-template-columns: 250px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    background: var(--admin-bg) !important;
}

.admin-sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1038 !important;
    width: 250px !important;
    height: 100vh !important;
    padding: 0.5rem !important;
    background: var(--admin-sidebar) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.18) !important;
}

.admin-sidebar .brand {
    min-height: 57px !important;
    padding: 0.55rem 0.65rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.admin-sidebar .brand-logo-wrap {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    border-radius: 50% !important;
    background: #fff !important;
}

.admin-sidebar a,
.admin-nav-group-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    min-height: 40px !important;
    padding: 0.58rem 0.72rem !important;
    border-radius: 0.35rem !important;
    background: transparent !important;
    color: #c2c7d0 !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
}

.admin-sidebar a i,
.admin-nav-group-toggle i {
    width: 1.25rem !important;
    min-width: 1.25rem !important;
    text-align: center !important;
}

.admin-sidebar a:hover,
.admin-sidebar a.active,
.admin-nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.admin-sidebar a.active {
    background: var(--admin-primary) !important;
    box-shadow: none !important;
}

.admin-submenu {
    border-left: 0 !important;
}

.admin-main {
    padding: 0 1rem 1.5rem !important;
    background: var(--admin-bg) !important;
}

.admin-navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    min-height: 57px !important;
    margin: 0 -1rem 1rem !important;
    padding: 0 1rem !important;
    background: var(--admin-surface) !important;
    border-bottom: 1px solid var(--admin-border) !important;
}

.admin-mobile-bar {
    display: none !important;
}

.admin-icon-button,
.admin-top-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border: 0 !important;
    border-radius: 0.35rem !important;
    background: transparent !important;
    color: #495057 !important;
}

.admin-navbar-title {
    flex: 1 !important;
    min-width: 0 !important;
    color: #495057 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.admin-navbar-actions,
.admin-user-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
}

.admin-avatar {
    display: inline-grid !important;
    place-items: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #e9ecef !important;
    color: #343a40 !important;
}

.admin-topbar h1 {
    margin: 0 !important;
    color: #212529 !important;
    font-size: 1.75rem !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
}

.admin-card,
.card.admin-card {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    background: #fff !important;
    border: 0 solid rgba(0, 0, 0, 0.125) !important;
    border-top: 3px solid #adb5bd !important;
    border-radius: 0.25rem !important;
    box-shadow: var(--admin-shadow) !important;
}

.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)) !important;
    gap: 1rem !important;
}

.summary-card {
    border-left: 0 !important;
    border-top-color: var(--admin-primary) !important;
}

.summary-card::after {
    content: none !important;
}

.summary-card strong {
    color: #212529 !important;
    font-size: 2rem !important;
}

.admin-table {
    border-collapse: collapse !important;
    color: #212529 !important;
}

.admin-table th,
.admin-table td {
    padding: 0.72rem 0.75rem !important;
    border-top: 1px solid var(--admin-border) !important;
    border-bottom: 0 !important;
}

.admin-table th {
    color: #495057 !important;
    font-weight: 700 !important;
}

.admin-body .button,
.admin-body .link-button,
.admin-body .danger-button,
.admin-body .secondary-button {
    min-height: 38px !important;
    padding: 0.46rem 0.78rem !important;
    border-radius: 0.25rem !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    transform: none !important;
}

.admin-body .button.primary {
    background: var(--admin-primary) !important;
    border-color: var(--admin-primary) !important;
    color: #fff !important;
}

.admin-body .link-button,
.admin-body .secondary-button,
.admin-body .button.secondary {
    background: #f8f9fa !important;
    border-color: #ced4da !important;
    color: #343a40 !important;
}

.admin-body .danger-button {
    background: var(--admin-danger) !important;
    border-color: var(--admin-danger) !important;
    color: #fff !important;
}

.admin-body input,
.admin-body textarea,
.admin-body select {
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    color: #212529 !important;
}

.admin-sidebar-collapsed .admin-shell {
    grid-template-columns: 74px minmax(0, 1fr) !important;
}

.admin-sidebar-collapsed .admin-sidebar {
    width: 74px !important;
}

.admin-sidebar-collapsed .admin-sidebar .brand span:last-child,
.admin-sidebar-collapsed .admin-sidebar a span,
.admin-sidebar-collapsed .admin-nav-group-toggle span,
.admin-sidebar-collapsed .admin-nav-group-toggle > i:last-child,
.admin-sidebar-collapsed .admin-submenu {
    display: none !important;
}

.admin-sidebar-collapsed .admin-sidebar a,
.admin-sidebar-collapsed .admin-nav-group-toggle,
.admin-sidebar-collapsed .admin-sidebar .brand {
    justify-content: center !important;
}

@media (max-width: 960px) {
    .admin-shell {
        display: block !important;
    }

    .admin-sidebar {
        position: fixed !important;
        inset: 0 auto 0 0 !important;
        width: min(86vw, 300px) !important;
        transform: translateX(-100%) !important;
        transition: transform 0.2s ease !important;
    }

    .admin-sidebar.open {
        transform: translateX(0) !important;
    }

    .admin-main {
        padding: 0 0.75rem 1rem !important;
    }

    .admin-navbar {
        margin-inline: -0.75rem !important;
    }

    .admin-navbar-title,
    .admin-user-chip span:last-child {
        display: none !important;
    }

    .admin-topbar {
        align-items: stretch !important;
        flex-direction: column !important;
    }
}

/* AdminLTE 4 inspired admin skin */
.admin-body {
    --admin-bg: #f4f6f9;
    --admin-surface: #ffffff;
    --admin-sidebar: #343a40;
    --admin-sidebar-deep: #2f353a;
    --admin-sidebar-muted: #c2c7d0;
    --admin-text: #212529;
    --admin-muted: #6c757d;
    --admin-border: #dee2e6;
    --admin-primary: #0d6efd;
    --admin-info: #0dcaf0;
    --admin-success: #198754;
    --admin-warning: #ffc107;
    --admin-danger: #dc3545;
    --admin-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
    margin: 0;
    min-height: 100vh;
    background: var(--admin-bg) !important;
    color: var(--admin-text);
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body h4,
.admin-body p {
    letter-spacing: 0;
}

.admin-shell {
    display: grid !important;
    grid-template-columns: 250px minmax(0, 1fr) !important;
    min-height: 100vh;
    background: var(--admin-bg);
}

.admin-sidebar {
    position: sticky !important;
    top: 0;
    z-index: 1038;
    width: 250px;
    height: 100vh !important;
    padding: 0.5rem !important;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--admin-sidebar) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.18);
}

.admin-sidebar .brand {
    display: flex;
    width: 100%;
    min-height: 57px;
    padding: 0.55rem 0.65rem !important;
    gap: 0.75rem;
    align-items: center;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent !important;
    color: #fff;
}

.admin-sidebar .brand:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.admin-sidebar .brand-logo-wrap {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    padding: 0.15rem !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.admin-sidebar .brand strong {
    font-size: 1.08rem !important;
    font-weight: 400;
    line-height: 1.2;
}

.admin-sidebar .brand small {
    color: var(--admin-sidebar-muted) !important;
    font-size: 0.78rem;
}

.admin-nav {
    display: grid;
    gap: 0.12rem;
    margin-top: 0.65rem !important;
}

.admin-sidebar a,
.admin-nav-group-toggle {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 40px !important;
    gap: 0.75rem;
    padding: 0.58rem 0.72rem !important;
    border: 0 !important;
    border-radius: 0.35rem !important;
    background: transparent;
    color: var(--admin-sidebar-muted) !important;
    font: inherit;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.admin-sidebar a i,
.admin-nav-group-toggle i {
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    font-size: 0.95rem;
}

.admin-nav-group-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.admin-nav-group-toggle > i:last-child {
    width: auto;
    margin-left: auto;
    transition: transform 0.15s ease;
}

.admin-nav-group-toggle.open > i:last-child {
    transform: rotate(-90deg);
}

.admin-sidebar a:hover,
.admin-sidebar a.active,
.admin-nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.admin-sidebar a.active {
    background: var(--admin-primary) !important;
    box-shadow: none !important;
}

.admin-submenu {
    display: none;
    margin: 0.1rem 0 0.25rem !important;
    padding-left: 0.6rem !important;
    border-left: 0 !important;
}

.admin-submenu.open {
    display: grid !important;
    gap: 0.1rem;
}

.admin-submenu a {
    min-height: 35px !important;
    padding-left: 1.05rem !important;
    font-size: 0.9rem !important;
}

.admin-main {
    min-width: 0;
    padding: 0 1rem 1.5rem !important;
    background: var(--admin-bg) !important;
}

.admin-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 57px;
    margin: 0 -1rem 1rem;
    padding: 0 1rem;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-icon-button,
.admin-top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: #495057;
    cursor: pointer;
}

.admin-icon-button:hover,
.admin-top-icon:hover {
    background: #f1f3f5;
    color: #111827;
}

.admin-navbar-title {
    min-width: 0;
    flex: 1;
    color: #495057;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-navbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.admin-top-icon {
    position: relative;
}

.admin-top-icon span {
    position: absolute;
    top: 3px;
    right: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--admin-danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 190px;
    color: #495057;
    font-size: 0.92rem;
    white-space: nowrap;
}

.admin-avatar {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #343a40;
    font-weight: 700;
}

.admin-mobile-bar {
    display: none !important;
}

.admin-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem;
    margin: 0 0 1rem !important;
    padding: 0.25rem 0 0;
}

.admin-topbar h1 {
    margin: 0 !important;
    color: #212529 !important;
    font-size: 1.75rem !important;
    font-weight: 400;
    line-height: 1.25 !important;
}

.admin-topbar .eyebrow,
.summary-card .eyebrow {
    margin-bottom: 0.25rem;
    color: var(--admin-muted) !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.admin-card,
.card.admin-card {
    position: relative;
    margin-bottom: 1rem !important;
    padding: 1rem !important;
    overflow-x: auto;
    background: var(--admin-surface) !important;
    border: 0 solid rgba(0, 0, 0, 0.125) !important;
    border-top: 3px solid #adb5bd !important;
    border-radius: 0.25rem !important;
    box-shadow: var(--admin-shadow) !important;
}

.admin-card h2 {
    margin: -0.1rem 0 0.9rem;
    color: #212529;
    font-size: 1.18rem;
    font-weight: 400;
}

.summary-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)) !important;
    gap: 1rem;
    margin: 1rem 0 !important;
}

.summary-card {
    min-height: 116px;
    border-left: 0 !important;
    border-top-color: var(--admin-primary) !important;
}

.summary-card::after {
    content: none !important;
}

.summary-card:nth-child(4n + 2) {
    border-top-color: var(--admin-info) !important;
}

.summary-card:nth-child(4n + 3) {
    border-top-color: var(--admin-success) !important;
}

.summary-card:nth-child(4n + 4) {
    border-top-color: var(--admin-warning) !important;
}

.summary-card strong {
    display: block;
    margin: 0.2rem 0 0.3rem !important;
    color: #212529 !important;
    font-size: 2rem !important;
    font-weight: 700;
    line-height: 1.05 !important;
    overflow-wrap: anywhere;
}

.summary-card span:last-child {
    color: var(--admin-muted) !important;
    font-size: 0.9rem;
}

.dashboard-widget-grid,
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-table {
    width: 100% !important;
    min-width: 720px;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    color: #212529;
    font-size: 0.94rem !important;
}

.admin-table thead {
    background: #fff !important;
}

.admin-table th {
    color: #495057 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
}

.admin-table th,
.admin-table td {
    padding: 0.72rem 0.75rem !important;
    border-top: 1px solid var(--admin-border) !important;
    border-bottom: 0 !important;
    text-align: left;
    vertical-align: middle;
}

.admin-table td:first-child {
    color: #212529 !important;
    font-weight: 600 !important;
}

.admin-table tbody tr:hover {
    background: rgba(13, 110, 253, 0.035) !important;
}

.table-thumb {
    width: 64px !important;
    height: 48px !important;
    border-radius: 0.25rem !important;
    border: 1px solid var(--admin-border) !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.25rem !important;
    background: var(--admin-success) !important;
    color: #fff !important;
    font-size: 0.78rem !important;
    font-weight: 700;
}

.admin-body .button,
.admin-body .link-button,
.admin-body .danger-button,
.admin-body .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px !important;
    padding: 0.46rem 0.78rem !important;
    border-radius: 0.25rem !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    font-size: 0.94rem;
    font-weight: 400 !important;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-body .button:hover,
.admin-body .link-button:hover,
.admin-body .danger-button:hover,
.admin-body .secondary-button:hover {
    transform: none !important;
    box-shadow: none !important;
}

.admin-body .button.primary {
    background: var(--admin-primary) !important;
    border-color: var(--admin-primary) !important;
    color: #fff !important;
}

.admin-body .button.primary:hover {
    background: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

.admin-body .button.secondary,
.admin-body .secondary-button,
.admin-body .link-button {
    background: #f8f9fa !important;
    border-color: #ced4da !important;
    color: #343a40 !important;
}

.admin-body .button.secondary:hover,
.admin-body .secondary-button:hover,
.admin-body .link-button:hover {
    background: #e9ecef !important;
    color: #212529 !important;
}

.admin-body .danger-button {
    background: var(--admin-danger) !important;
    border-color: var(--admin-danger) !important;
    color: #fff !important;
}

.admin-body .danger-button:hover {
    background: #bb2d3b !important;
    border-color: #b02a37 !important;
}

.table-actions {
    display: flex !important;
    align-items: center;
    gap: 0.45rem !important;
    flex-wrap: wrap;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.form-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.admin-body label {
    display: grid;
    gap: 0.35rem;
    color: #212529 !important;
    font-size: 0.92rem !important;
    font-weight: 600;
}

.admin-body input,
.admin-body textarea,
.admin-body select {
    width: 100%;
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    color: #212529 !important;
    font: inherit;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.admin-body textarea {
    min-height: 110px;
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
    outline: 0;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

.form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--admin-border);
}

.form-tabs a {
    padding: 0.45rem 0.75rem !important;
    border-radius: 0.25rem !important;
    background: transparent !important;
    color: var(--admin-primary) !important;
    font-weight: 600 !important;
}

.form-tabs a.active,
.form-tabs a:hover {
    background: var(--admin-primary) !important;
    color: #fff !important;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.check-tile {
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    width: auto;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: 0.25rem;
    background: #f8f9fa;
    font-weight: 500 !important;
}

.check-tile input {
    width: auto;
    min-height: auto;
    margin: 0;
    box-shadow: none;
}

.flash {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem !important;
    border-radius: 0.25rem !important;
    box-shadow: var(--admin-shadow) !important;
}

.flash-success {
    border-color: rgba(25, 135, 84, 0.35) !important;
    background: #d1e7dd !important;
    color: #0f5132 !important;
}

.flash-error {
    border-color: rgba(220, 53, 69, 0.35) !important;
    background: #f8d7da !important;
    color: #842029 !important;
}

.message-toast {
    right: 1rem !important;
    bottom: 1rem !important;
    border-radius: 0.25rem !important;
    background: var(--admin-info) !important;
    color: #052c35 !important;
    box-shadow: var(--admin-shadow) !important;
}

.dataTables_wrapper {
    color: #212529;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--admin-muted) !important;
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    margin: 0 0.35rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.25rem !important;
}

.upload-dropzone {
    border-radius: 0.25rem !important;
    border-color: #adb5bd !important;
    background: #f8f9fa !important;
}

.login-wrap {
    min-height: 100vh !important;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--admin-bg) !important;
}

.login-card {
    width: min(410px, 100%);
    padding: 1.35rem !important;
    border-radius: 0.25rem !important;
    border-top: 3px solid var(--admin-primary) !important;
    box-shadow: var(--admin-shadow) !important;
    background: #fff !important;
}

.login-card h1 {
    margin-bottom: 0.5rem;
    font-size: 1.9rem !important;
    font-weight: 400;
    line-height: 1.2;
}

.login-card p {
    color: var(--admin-muted);
}

.login-logo-wrap {
    margin-bottom: 1rem;
}

.login-logo {
    width: min(170px, 58%) !important;
}

.admin-sidebar-collapsed .admin-shell {
    grid-template-columns: 74px minmax(0, 1fr) !important;
}

.admin-sidebar-collapsed .admin-sidebar {
    width: 74px;
}

.admin-sidebar-collapsed .admin-sidebar .brand {
    justify-content: center;
    padding-inline: 0.35rem !important;
}

.admin-sidebar-collapsed .admin-sidebar .brand span:last-child,
.admin-sidebar-collapsed .admin-sidebar a span,
.admin-sidebar-collapsed .admin-nav-group-toggle span {
    display: none !important;
}

.admin-sidebar-collapsed .admin-sidebar a,
.admin-sidebar-collapsed .admin-nav-group-toggle {
    justify-content: center;
    padding-inline: 0.55rem !important;
}

.admin-sidebar-collapsed .admin-nav-group-toggle > i:last-child,
.admin-sidebar-collapsed .admin-submenu {
    display: none !important;
}

@media (max-width: 960px) {
    .admin-shell {
        display: block !important;
    }

    .admin-sidebar {
        position: fixed !important;
        inset: 0 auto 0 0;
        display: block !important;
        width: min(86vw, 300px) !important;
        max-width: 300px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

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

    .admin-main {
        padding: 0 0.75rem 1rem !important;
    }

    .admin-navbar {
        margin-inline: -0.75rem;
    }

    .admin-navbar-title {
        display: none;
    }

    .admin-user-chip span:last-child {
        display: none;
    }

    .admin-mobile-bar {
        display: none !important;
    }

    .admin-topbar {
        align-items: stretch !important;
        flex-direction: column;
    }

    .admin-topbar .button,
    .admin-topbar .secondary-button,
    .admin-topbar .link-button {
        width: 100%;
    }

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

    .form-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-topbar h1 {
        font-size: 1.45rem !important;
    }

    .summary-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-card,
    .card.admin-card {
        padding: 0.85rem !important;
    }

    .table-actions {
        align-items: stretch;
    }

    .table-actions .button,
    .table-actions .link-button,
    .table-actions .danger-button,
    .table-actions .secondary-button,
    .table-actions form {
        width: 100%;
    }
}

.dashboard-widget-grid,
.mail-layout {
    display: grid;
    gap: 1rem;
}

.dashboard-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mail-layout {
    grid-template-columns: 190px minmax(280px, 0.9fr) minmax(360px, 1.2fr);
    align-items: start;
}

.gmail-mail-layout {
    grid-template-columns: 210px minmax(420px, 1fr) minmax(440px, 1.05fr);
}

.mail-sidebar {
    position: sticky;
    top: 1rem;
}

.mail-sidebar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border-radius: 8px;
    color: var(--text);
}

.mail-sidebar a span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.mail-sidebar a.active,
.mail-sidebar a:hover {
    background: #e6f1ef;
    color: var(--brand-dark);
}

.mail-folder-count {
    min-width: 1.65rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.mail-compose-shortcut {
    justify-content: center !important;
    margin-bottom: 0.7rem;
}

.mail-list-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.mail-search-form,
.mail-bulk-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
}

.mail-search-form input {
    min-width: min(420px, 100%);
}

.mail-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.mail-table th,
.mail-table td {
    padding: 0.72rem 0.55rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.mail-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mail-table th:nth-child(1),
.mail-table td:nth-child(1) {
    width: 42px;
}

.mail-table th:nth-child(2),
.mail-table td:nth-child(2) {
    width: 48px;
}

.mail-table th:nth-child(3),
.mail-table td:nth-child(3) {
    width: 25%;
}

.mail-table th:nth-child(6),
.mail-table td:nth-child(6) {
    width: 122px;
}

.mail-table a {
    color: var(--text);
}

.mail-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-preview-link {
    color: var(--muted) !important;
}

.mail-subject-link {
    font-weight: 700;
}

.mail-date {
    color: var(--muted);
    font-size: 0.86rem;
}

.mail-unread td {
    background: #f4faf9;
    font-weight: 700;
}

.mail-selected td {
    background: #edf7ff;
}

.mail-body {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.mail-body img {
    max-width: 100%;
    height: auto;
}

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

.mail-body td,
.mail-body th {
    border: 1px solid var(--line);
    padding: 0.5rem;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--brand-dark);
    cursor: pointer;
    font-weight: 800;
}

.mail-star-button {
    color: #9ca3af;
}

.mail-star-button.is-starred {
    border-color: #f5c542;
    background: #fff8df;
    color: #d69e00;
}

.mail-reader-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.mail-reader-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.mail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin: 1rem 0;
}

.mail-meta-grid div {
    min-width: 0;
}

.mail-meta-grid dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mail-meta-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.mail-attachments {
    margin-top: 1rem;
}

.mail-compose-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mail-editor-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.mail-editor-toolbar {
    display: flex;
    gap: 0.35rem;
    padding: 0.45rem;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.mail-rich-editor {
    min-height: 220px;
    padding: 0.9rem;
    outline: none;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.mail-rich-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(30, 106, 91, 0.18);
}

.mail-pagination {
    margin-top: 1rem;
}

.inline-form {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 1180px) {
    .mail-layout,
    .gmail-mail-layout {
        grid-template-columns: 1fr;
    }

    .mail-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
    }

    .mail-list-toolbar,
    .mail-reader-header {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .dashboard-widget-grid {
        grid-template-columns: 1fr;
    }

    .mail-table {
        table-layout: auto;
    }

    .mail-table th:nth-child(5),
    .mail-table td:nth-child(5) {
        display: none;
    }

    .mail-table th:nth-child(3),
    .mail-table td:nth-child(3) {
        width: auto;
    }

    .mail-meta-grid {
        grid-template-columns: 1fr;
    }
}

.site-header {
    background: rgba(250, 247, 241, 0.96);
}

.hero-modern {
    position: relative;
    overflow: hidden;
    padding-top: 5.4rem;
    padding-bottom: 5rem;
}

.hero-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 12%, rgba(14, 92, 87, 0.18), transparent 20%),
        radial-gradient(circle at 15% 10%, rgba(217, 143, 43, 0.22), transparent 24%);
    pointer-events: none;
}

.hero-grid-wide {
    grid-template-columns: 1.2fr 0.8fr;
    position: relative;
}

.hero-panel-stack {
    display: grid;
    gap: 1rem;
}

.hero-strip,
.category-hero-gallery,
.subcategory-photo-set,
.category-gallery {
    display: grid;
    gap: 0.8rem;
}

.hero-strip,
.category-hero-gallery {
    grid-template-columns: repeat(3, 1fr);
}

.hero-strip img,
.category-hero-gallery img,
.subcategory-photo-set img,
.category-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: #fff;
}

.search-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.85rem;
    margin-top: 1.6rem;
    max-width: 760px;
}

.search-bar input,
.search-filter-bar input {
    min-height: 56px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.category-grid-large {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.category-tile {
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(255, 255, 255, 0.94);
}

.category-gallery {
    grid-template-columns: repeat(3, 1fr);
    padding: 1rem 1rem 0;
}

.category-gallery img {
    height: 120px;
}

.subcategory-list {
    display: grid;
    gap: 1.4rem;
}

.subcategory-row {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    overflow: hidden;
}

.subcategory-photo-set {
    grid-template-columns: repeat(3, 1fr);
    padding: 1rem;
    background: linear-gradient(135deg, rgba(14, 92, 87, 0.06), rgba(217, 143, 43, 0.08));
}

.subcategory-photo-set img {
    height: 160px;
}

.subcategory-content {
    padding: 1.4rem 1.5rem 1.5rem 0.5rem;
}

.product-card-pro {
    border: 1px solid rgba(216, 205, 187, 0.95);
}

.search-filter-bar {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
}

.category-hero-gallery.compact img {
    height: 140px;
}

.page-intro {
    max-width: 920px;
}

.page-intro p {
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 960px) {
    .hero-grid-wide,
    .subcategory-row {
        grid-template-columns: 1fr;
    }

    .search-filter-bar,
    .search-bar {
        grid-template-columns: 1fr;
    }

    .subcategory-content {
        padding: 1rem 1rem 1.4rem;
    }
}

.badge.sold {
    background: #f9d8d1;
    color: #922f21;
}

.checkbox-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.check-tile {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #f8f4ec;
    border: 1px solid var(--line);
}

.check-tile input {
    width: auto;
}

.media-slider {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 92, 87, 0.08), rgba(217, 143, 43, 0.08));
}

.media-slider-track {
    position: relative;
    min-height: 180px;
}

.media-slider-track img,
.media-slider-track video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.media-slider-track img.is-active,
.media-slider-track img:first-child,
.media-slider-track video.is-active,
.media-slider-track video:first-child {
    opacity: 1;
    transform: scale(1);
}

.media-slider-wide {
    border-radius: 24px;
    border: 1px solid rgba(216, 205, 187, 0.8);
}

.media-slider-wide .media-slider-track {
    min-height: 260px;
}

.category-header-photo {
    width: 100%;
    margin: 0 0 1.5rem;
    overflow: hidden;
}

.category-header-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(216, 205, 187, 0.8);
    background: #fff;
}

.subcategory-slider .media-slider-track,
.product-slider .media-slider-track {
    min-height: 220px;
}

.product-card-pro .card-media {
    min-height: 220px;
}

.pill-hot {
    background: #ffe5b8;
    color: #8a5100;
}

.pill-sold {
    background: #f8d7d2;
    color: #8f2a1b;
}

.product-marquee {
    overflow: hidden;
    border-top: 1px solid rgba(216, 205, 187, 0.8);
    border-bottom: 1px solid rgba(216, 205, 187, 0.8);
    background: #f7efe1;
    padding: 0.85rem 0;
}

.marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: marquee-scroll 34s linear infinite;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 1rem 0.65rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(216, 205, 187, 0.9);
    white-space: nowrap;
}

.marquee-item strong {
    color: var(--brand-dark);
}

.marquee-thumb {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(14, 92, 87, 0.16);
    background: #fff;
    flex: 0 0 46px;
}

.document-brand {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: start;
    border-bottom: 1px solid #e7ded0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.document-brand-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 220px;
}

.document-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.document-brand-mark {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.document-brand-right {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.company {
    text-align: right;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    max-width: 360px;
}

.invoice-title {
    font-size: 26px;
    margin-top: 20px;
    color: #0b3c6f;
    font-weight: 800;
}

.doc-meta {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.doc-meta-right {
    text-align: right;
}

.document-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e7ded0;
    color: var(--muted);
    font-size: 0.94rem;
}

.doc-actions form {
    display: inline-flex;
}

.message-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: #0b3c6f;
    color: #fff;
    box-shadow: 0 14px 32px rgba(11, 60, 111, 0.22);
    font-weight: 700;
}

.category-tile .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card-action {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: center;
}

.catalog-click-card,
.product-card-pro,
.similar-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.catalog-click-card:hover,
.product-card-pro:hover,
.similar-card:hover {
    transform: translateY(-6px);
    border-color: rgba(14, 92, 87, 0.3);
    box-shadow: 0 24px 58px rgba(31, 42, 48, 0.14);
}

.category-media-link,
.product-card-media-link,
.subcategory-media-link {
    display: block;
    overflow: hidden;
}

.category-media-link img,
.product-card-media-link img,
.product-card-media-link video,
.similar-card img {
    transition: transform 0.35s ease;
}

.catalog-click-card:hover .category-media-link img,
.product-card-pro:hover .product-card-media-link img,
.product-card-pro:hover .product-card-media-link video,
.similar-card:hover img {
    transform: scale(1.045);
}

.category-tile h3 a,
.product-card-pro h3 a {
    color: var(--brand-dark);
}

.subcategory-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

.subcategory-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.7rem;
    border-radius: 999px;
    background: #edf6ff;
    color: #154d82;
    border: 1px solid rgba(21, 77, 130, 0.14);
    font-size: 0.86rem;
    font-weight: 700;
}

.subcategory-chip:hover {
    background: #dff0ff;
}

.product-card-pro {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
}

.product-card-pro .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
}

.product-card-pro .card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-pro .details-list {
    display: grid;
    gap: 0.4rem;
    padding-left: 0;
    list-style: none;
}

.product-card-pro .price-row {
    margin-top: auto;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
}

.product-card-pro .price-row strong {
    color: #a65300;
    font-size: 1.08rem;
}

.product-card-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.35rem;
}

.product-detail-section {
    background:
        linear-gradient(135deg, rgba(237, 246, 255, 0.85), rgba(255, 249, 240, 0.92)),
        #fbf8f2;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 2rem;
    align-items: start;
}

.product-gallery-panel,
.product-buy-panel,
.product-info-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(216, 205, 187, 0.82);
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(31, 42, 48, 0.1);
}

.product-gallery-panel {
    padding: 1rem;
}

.product-main-media {
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(14, 92, 87, 0.08), rgba(217, 143, 43, 0.08));
}

.product-main-media img,
.product-main-media video,
.product-main-media .placeholder-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
}

.product-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.product-thumbs button {
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
    background: #fff;
    cursor: pointer;
}

.product-thumbs button.active {
    border-color: var(--accent);
}

.product-thumbs img,
.product-thumbs video {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-buy-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    position: sticky;
    top: 96px;
}

.breadcrumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumb-row span::before {
    content: "/";
    margin-right: 0.45rem;
    color: #a7a099;
}

.product-buy-panel h1 {
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.05;
}

.product-price {
    color: #a65300;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.product-detail-copy {
    color: var(--muted);
    line-height: 1.8;
}

.product-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.35rem;
}

.product-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    margin-top: 1.6rem;
}

.product-info-card {
    padding: 1.5rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.spec-grid div {
    padding: 0.9rem;
    border-radius: 16px;
    background: #f7fbff;
    border: 1px solid rgba(21, 77, 130, 0.1);
}

.spec-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 0.25rem;
}

.similar-section {
    padding-top: 0;
}

.similar-product-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 280px);
    gap: 1rem;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 1rem;
    scroll-snap-type: x mandatory;
}

.similar-card {
    scroll-snap-align: start;
}

.similar-card img,
.similar-card .placeholder-media {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.similar-card h3 {
    font-size: 1.05rem;
    line-height: 1.25;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 960px) {
    .document-brand {
        flex-direction: column;
    }

    .product-detail-layout,
    .product-info-grid {
        grid-template-columns: 1fr;
    }

    .product-buy-panel {
        position: static;
    }

    .brand-logo-wrap {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .brand strong {
        font-size: 0.95rem;
    }

    .brand small {
        font-size: 0.72rem;
    }
}

@media (max-width: 640px) {
    .category-grid-large,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card-actions,
    .product-cta-row {
        align-items: stretch;
        flex-direction: column;
    }

    .product-card-actions .button,
    .product-cta-row .button {
        width: 100%;
    }

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

    .product-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* Appended new selectors from style - new.css */


    background:
        linear-gradient(180deg, #f7faf9 0%, #eef3f2 100%);
    color: #1b2730;
}

.admin-body .button,
.admin-body .link-button,
.admin-body .danger-button,
.admin-body .secondary-button {
    min-height: 40px;
    border-radius: 10px;
    box-shadow: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}


    min-height: 40px;
    border-radius: 10px;
    box-shadow: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.admin-body .button:hover,
.admin-body .link-button:hover,
.admin-body .danger-button:hover,
.admin-body .secondary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(27, 39, 48, 0.08);
}


    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(27, 39, 48, 0.08);
}

.admin-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}


    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background:
        linear-gradient(180deg, #0a3938 0%, #102a32 100%);
    color: #fff;
    padding: 1.15rem 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}


    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background:
        linear-gradient(180deg, #0a3938 0%, #102a32 100%);
    color: #fff;
    padding: 1.15rem 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar .brand {
    width: 100%;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}


    width: 100%;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.admin-sidebar .brand-logo-wrap {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    padding: 0.2rem;
}


    width: 46px;
    height: 46px;
    flex-basis: 46px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    padding: 0.2rem;
}

.admin-sidebar .brand strong {
    font-size: 0.98rem;
}


    font-size: 0.98rem;
}

.admin-sidebar .brand small {
    color: rgba(255, 255, 255, 0.68);
}


    color: rgba(255, 255, 255, 0.68);
}

.admin-nav {
    display: grid;
    gap: 0.2rem;
    margin-top: 1.15rem;
}


    display: grid;
    gap: 0.2rem;
    margin-top: 1.15rem;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    min-height: 42px;
    color: rgba(255, 255, 255, 0.78);
    padding: 0.72rem 0.8rem;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 700;
}


    display: flex;
    align-items: center;
    min-height: 42px;
    color: rgba(255, 255, 255, 0.78);
    padding: 0.72rem 0.8rem;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 700;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}


    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-sidebar a.active {
    box-shadow: inset 3px 0 0 #f3b35f;
}


    box-shadow: inset 3px 0 0 #f3b35f;
}

.admin-nav-group {
    margin-bottom: 0.15rem;
}


    margin-bottom: 0.15rem;
}

.admin-nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0.72rem 0.8rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 800;
}


    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0.72rem 0.8rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 800;
}

.admin-submenu {
    display: none;
    margin: 0.15rem 0 0.3rem 0.45rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}


    display: none;
    margin: 0.15rem 0 0.3rem 0.45rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-submenu.open {
    display: block;
}


    min-width: 0;
    padding: 2rem clamp(1.4rem, 3vw, 2.4rem);
}

.admin-topbar,
.table-actions,
.upload-dropzone,
.gallery-preview {
    display: flex;
    gap: 1rem;
}


    justify-content: space-between;
    align-items: center;
}

.admin-topbar {
    margin-bottom: 1.35rem;
}


    margin-bottom: 1.35rem;
}

.admin-topbar h1 {
    max-width: 980px;
    margin-bottom: 0;
    color: #16242c;
    letter-spacing: 0;
    line-height: 1.08;
}


    max-width: 980px;
    margin-bottom: 0;
    color: #16242c;
    letter-spacing: 0;
    line-height: 1.08;
}

.admin-topbar .eyebrow,
.summary-card .eyebrow {
    color: #60727d;
    font-weight: 800;
}


    color: #60727d;
    font-weight: 800;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin: 1.5rem 0;
}


    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin: 1.5rem 0;
}

.summary-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-left: 4px solid #0e5c57;
}


    position: relative;
    min-width: 0;
    overflow: hidden;
    border-left: 4px solid #0e5c57;
}

.summary-card strong {
    display: block;
    margin: 0.15rem 0 0.25rem;
    font-size: 2.2rem;
    line-height: 1;
    color: #143f4a;
}


    display: block;
    margin: 0.15rem 0 0.25rem;
    font-size: 2.2rem;
    line-height: 1;
    color: #143f4a;
}

.summary-card span:last-child {
    color: #62717a;
    font-size: 0.92rem;
}


    color: #62717a;
    font-size: 0.92rem;
}

.summary-card::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -30px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(14, 92, 87, 0.08);
}


    content: "";
    position: absolute;
    right: -24px;
    top: -30px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(14, 92, 87, 0.08);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}


    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.analytics-panel h2 {
    margin-bottom: 1rem;
    font-size: 1.18rem;
    color: #16242c;
}


    margin-bottom: 1rem;
    font-size: 1.18rem;
    color: #16242c;
}

.admin-card {
    padding: 1.35rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(208, 218, 217, 0.9);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(27, 39, 48, 0.07);
}


    padding: 1.35rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(208, 218, 217, 0.9);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(27, 39, 48, 0.07);
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
    font-size: 0.95rem;
}


    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
    font-size: 0.95rem;
}

.admin-table thead {
    background: #f5f8f8;
}


    background: #f5f8f8;
}

.admin-table th {
    color: #52646d;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


    color: #52646d;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-table th,
.admin-table td {
    padding: 0.86rem 0.75rem;
    border-bottom: 1px solid #e8eeee;
    text-align: left;
    vertical-align: middle;
}


    padding: 0.86rem 0.75rem;
    border-bottom: 1px solid #e8eeee;
    text-align: left;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background 0.14s ease;
}


    transition: background 0.14s ease;
}

.admin-table tbody tr:hover {
    background: #fbfdfd;
}


    background: #fbfdfd;
}

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


    border-bottom: 0;
}

.admin-table td:first-child {
    font-weight: 800;
    color: #20313a;
}


    font-weight: 800;
    color: #20313a;
}

.table-thumb {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8eeee;
}


    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8eeee;
}

.badge {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    background: #edf7f4;
    color: #0d5a52;
    font-size: 0.84rem;
    font-weight: 700;
}


    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    background: #edf7f4;
    color: #0d5a52;
    font-size: 0.84rem;
    font-weight: 700;
}

.link-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
}


    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.link-button {
    background: #f4f8f8;
    border-color: #dfe8e8;
    color: #163c46;
}


    background: #f4f8f8;
    border-color: #dfe8e8;
    color: #163c46;
}

.danger-button {
    background: #fff4f2;
    border-color: #f0c9c3;
    color: var(--danger);
}


    background: #fff4f2;
    border-color: #f0c9c3;
    color: var(--danger);
}

.secondary-button {
    padding: 0.62rem 0.85rem;
    font-weight: 700;
    border: 1px solid #d5e4e2;
    background: #f2f7f6;
    color: #163c46;
    cursor: pointer;
}


    padding: 0.62rem 0.85rem;
    font-weight: 700;
    border: 1px solid #d5e4e2;
    background: #f2f7f6;
    color: #163c46;
    cursor: pointer;
}

.upload-dropzone {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border: 1.5px dashed #b8c9c7;
    border-radius: 12px;
    background: #f8fbfb;
    text-align: center;
    padding: 1.25rem;
}


    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border: 1.5px dashed #b8c9c7;
    border-radius: 12px;
    background: #f8fbfb;
    text-align: center;
    padding: 1.25rem;
}

.upload-dropzone.is-dragover {
    border-color: var(--brand);
    background: #eef7f6;
}


    display: grid;
    gap: 0.55rem;
    width: 132px;
    padding: 0.65rem;
    border: 1px solid #e0e8e7;
    border-radius: 8px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.media-delete-tile img,
.media-delete-tile video {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
}


    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #e0e8e7;
    padding-bottom: 0.75rem;
}

.form-tabs a {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: #f4f8f8;
    color: #24343d;
    font-weight: 800;
}


    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: #f4f8f8;
    color: #24343d;
    font-weight: 800;
}

.form-tabs a.active,
.form-tabs a:focus,
.form-tabs a:hover {
    background: var(--brand);
    color: #fff;
}


    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.admin-body label {
    color: #30424b;
    font-size: 0.92rem;
}


    color: #30424b;
    font-size: 0.92rem;
}

.admin-body input,
.admin-body textarea,
.admin-body select {
    border-color: #d8e2e1;
    border-radius: 10px;
    background: #fbfdfd;
    color: #1b2730;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}


    border-color: #d8e2e1;
    border-radius: 10px;
    background: #fbfdfd;
    color: #1b2730;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
    outline: 0;
    border-color: #2b7c75;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 92, 87, 0.11);
}


    outline: 0;
    border-color: #2b7c75;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 92, 87, 0.11);
}

.email-compose-card {
    max-width: 860px;
}


    max-width: 860px;
}

.whatsapp-share-card input[readonly],
.whatsapp-share-card textarea[readonly] {
    background: #f8faf9;
}


    background: #f8faf9;
}

.whatsapp-share-actions {
    align-items: center;
}


    align-items: center;
}

button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}


    cursor: not-allowed;
    opacity: 0.56;
}

.document-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}


    min-width: 110px;
}

.line-items-table {
    min-width: 860px;
}


    min-width: 860px;
}

.line-items-table td:first-child input {
    min-width: 240px;
}


    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.doc-meta {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    margin-bottom: 1rem;
}


    .hero-grid,
    .two-column,
    .footer-grid {
        grid-template-columns: 1fr;
    }


        grid-template-columns: 1fr;
    }

    .admin-body {
        overflow-x: hidden;
    }


        overflow-x: hidden;
    }

    .admin-shell {
        display: block;
    }


        display: block;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.8rem);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }


        position: fixed;
        inset: 0 auto 0 0;
        z-index: 100;
        display: block;
        width: min(86vw, 320px);
        max-height: 100vh;
        height: 100vh;
        overflow-y: auto;
        padding: 1.25rem;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 22px 0 44px rgba(15, 47, 45, 0.22);
    }

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


        transform: translateX(0);
    }

    .admin-mobile-bar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 90;
        justify-content: flex-start;
        margin: -1rem -1rem 1rem;
        padding: 0.75rem 1rem;
        background: rgba(247, 250, 249, 0.96);
        border-bottom: 1px solid #dce7e6;
        backdrop-filter: blur(10px);
    }


        display: flex;
        position: sticky;
        top: 0;
        z-index: 90;
        justify-content: flex-start;
        margin: -1rem -1rem 1rem;
        padding: 0.75rem 1rem;
        background: rgba(247, 250, 249, 0.96);
        border-bottom: 1px solid #dce7e6;
        backdrop-filter: blur(10px);
    }

    .admin-main {
        padding: 1rem;
    }


        padding: 1rem;
    }

    .admin-topbar,
    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }


        align-items: stretch;
        flex-direction: column;
    }

    .table-actions {
        gap: 0.55rem;
    }


        gap: 0.55rem;
    }

    .admin-topbar h1 {
        font-size: 1.6rem;
    }


        font-size: 1.6rem;
    }

    .summary-card {
        min-width: 0;
    }


        min-width: 0;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }


        grid-template-columns: 1fr;
        gap: 0;
    }

    .document-grid,
    .form-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }


        grid-template-columns: 1fr;
    }

    .doc-actions,
    .whatsapp-share-actions {
        align-items: stretch;
        flex-direction: column;
    }


        align-items: stretch;
        flex-direction: column;
    }

    .doc-actions .button,
    .doc-actions a,
    .doc-actions button,
    .table-actions .button,
    .table-actions a,
    .table-actions button {
        width: 100%;
    }


        width: 100%;
    }

    .document-brand {
        align-items: flex-start;
    }


        align-items: flex-start;
    }

    .document-brand-left {
        flex-basis: auto;
        width: 100%;
    }


        flex-basis: auto;
        width: 100%;
    }

    .document-logo {
        width: min(160px, 100%);
        height: auto;
    }


        width: min(160px, 100%);
        height: auto;
    }

    .document-brand-right {
        justify-content: flex-start;
        width: 100%;
    }


        justify-content: flex-start;
        width: 100%;
    }

    .company,
    .doc-meta-right {
        max-width: 100%;
        text-align: left;
    }


        max-width: 100%;
        text-align: left;
    }

    .doc-meta {
        display: grid;
        grid-template-columns: 1fr;
    }


        display: grid;
        grid-template-columns: 1fr;
    }

    .document-summary {
        justify-content: stretch;
    }


        justify-content: stretch;
    }

    .document-summary div {
        min-width: 0;
    }


        min-width: 0;
    }
}

@media (max-width: 640px) {
    .hero,
    .section {
        padding: 3rem 0;
    }

    h1 {
        line-height: 1.05;
    }

    .admin-main {
        padding: 0.75rem;
    }

    .admin-mobile-bar {
        margin: -0.75rem -0.75rem 0.75rem;
        padding: 0.7rem 0.75rem;
    }

    .admin-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1rem 0;
    }

    .summary-card strong {
        font-size: 1.9rem;
    }

    .admin-table {
        min-width: 680px;
    }

    .line-items-table input {
        min-width: 140px;
    }

    .line-items-table td:first-child input {
        min-width: 220px;
    }

    .button,
    .link-button,
    .danger-button,
    .secondary-button {
        width: 100%;
        white-space: normal;
    }

    input,
    textarea,
    select {
        border-radius: 10px;
        padding: 0.78rem 0.85rem;
    }

    .email-compose-card {
        max-width: 100%;
    }

    .login-wrap {
        padding: 1rem;
    }
}


        padding: 0.75rem;
    }

    .admin-mobile-bar {
        margin: -0.75rem -0.75rem 0.75rem;
        padding: 0.7rem 0.75rem;
    }


        margin: -0.75rem -0.75rem 0.75rem;
        padding: 0.7rem 0.75rem;
    }

    .admin-card {
        padding: 1rem;
        border-radius: 12px;
    }


        padding: 1rem;
        border-radius: 12px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1rem 0;
    }


        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1rem 0;
    }

    .summary-card strong {
        font-size: 1.9rem;
    }


        font-size: 1.9rem;
    }

    .admin-table {
        min-width: 680px;
    }


        min-width: 680px;
    }

    .line-items-table input {
        min-width: 140px;
    }


        min-width: 140px;
    }

    .line-items-table td:first-child input {
        min-width: 220px;
    }


        min-width: 220px;
    }

    .button,
    .link-button,
    .danger-button,
    .secondary-button {
        width: 100%;
        white-space: normal;
    }


        width: 100%;
        white-space: normal;
    }

    input,
    textarea,
    select {
        border-radius: 10px;
        padding: 0.78rem 0.85rem;
    }


        border-radius: 10px;
        padding: 0.78rem 0.85rem;
    }

    .email-compose-card {
        max-width: 100%;
    }


        max-width: 100%;
    }

    .login-wrap {
        padding: 1rem;
    }


        padding: 1rem;
    }
}

@media print {

    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body {
        width: 210mm;
        min-height: 297mm;
    }

    body {
        margin: 0;
        padding: 0;
        background: #fff;
        color: #111;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body * {
        visibility: hidden;
    }

    #invoice,
    #invoice * {
        visibility: visible;
        font-family: Arial, Helvetica, sans-serif !important;
        font-style: normal !important;
        font-variant: normal !important;
        font-feature-settings: normal !important;
        letter-spacing: 0 !important;
        text-rendering: geometricPrecision;
    }

    #invoice {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        max-width: 190mm;
        margin: 0 auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    hr,
    footer,
    .no-print,
    .print-btn,
    nav,
    header {
        display: none !important;
    }

    * {
        box-shadow: none !important;
    }

    .admin-sidebar,
    .admin-mobile-bar,
    .admin-topbar,
    .doc-actions,
    .site-header,
    .site-footer,
    .message-toast,
    .flash,
    .document-footer {
        display: none !important;
    }

    body > *:not(.admin-shell),
    .admin-shell > *:not(.admin-main),
    .admin-main > *:not(#invoice) {
        display: none !important;
    }

    .admin-shell,
    .admin-main {
        display: block !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body::before,
    body::after,
    .admin-shell::before,
    .admin-shell::after,
    .admin-main::before,
    .admin-main::after,
    #invoice::before,
    #invoice::after {
        content: none !important;
        display: none !important;
        border: 0 !important;
    }

    a[href]::after {
        content: none !important;
    }

    #invoice,
    #invoice * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    #invoice::-webkit-scrollbar,
    #invoice *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .admin-card,
    .card,
    .document-brand,
    .doc-section,
    .document-summary,
    .admin-table,
    .admin-table th,
    .admin-table td {
        box-shadow: none !important;
        overflow: visible !important;
    }

    .document-brand {
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 8mm !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .doc-meta,
    .document-summary,
    .doc-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .invoice-title {
        color: #111 !important;
        margin: 6mm 0 !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
    }

    .company,
    .doc-meta,
    .doc-meta-right {
        color: #111 !important;
    }

    .admin-table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: table;
        table-layout: fixed !important;
        white-space: normal;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    .admin-table thead {
        display: table-header-group;
        background: #fff !important;
    }

    .admin-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .admin-table th,
    .admin-table td {
        padding: 6px 7px !important;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        color: #111 !important;
        background: #fff !important;
    }

    .admin-table tbody tr:last-child td,
    #invoice > *:last-child {
        border-bottom: none !important;
    }

    .document-footer {
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
}


        size: A4;
        margin: 10mm;
    }

    html,
    body {
        width: 210mm;
        min-height: 297mm;
    }


        width: 210mm;
        min-height: 297mm;
    }

    body {
        margin: 0;
        padding: 0;
        background: #fff;
        color: #111;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }


        margin: 0;
        padding: 0;
        background: #fff;
        color: #111;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body * {
        visibility: hidden;
    }


        visibility: hidden;
    }

    #invoice,
    #invoice * {
        visibility: visible;
        font-family: Arial, Helvetica, sans-serif !important;
        font-style: normal !important;
        font-variant: normal !important;
        font-feature-settings: normal !important;
        letter-spacing: 0 !important;
        text-rendering: geometricPrecision;
    }


        visibility: visible;
        font-family: Arial, Helvetica, sans-serif !important;
        font-style: normal !important;
        font-variant: normal !important;
        font-feature-settings: normal !important;
        letter-spacing: 0 !important;
        text-rendering: geometricPrecision;
    }

    #invoice {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        max-width: 190mm;
        margin: 0 auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }


        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        max-width: 190mm;
        margin: 0 auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    hr,
    footer,
    .no-print,
    .print-btn,
    nav,
    header {
        display: none !important;
    }


        display: none !important;
    }

    * {
        box-shadow: none !important;
    }


        box-shadow: none !important;
    }

    .admin-sidebar,
    .admin-mobile-bar,
    .admin-topbar,
    .doc-actions,
    .site-header,
    .site-footer,
    .message-toast,
    .flash,
    .document-footer {
        display: none !important;
    }


        display: none !important;
    }

    body > *:not(.admin-shell),
    .admin-shell > *:not(.admin-main),
    .admin-main > *:not(#invoice) {
        display: none !important;
    }


        display: block !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body::before,
    body::after,
    .admin-shell::before,
    .admin-shell::after,
    .admin-main::before,
    .admin-main::after,
    #invoice::before,
    #invoice::after {
        content: none !important;
        display: none !important;
        border: 0 !important;
    }


        content: none !important;
        display: none !important;
        border: 0 !important;
    }

    a[href]::after {
        content: none !important;
    }


        content: none !important;
    }

    #invoice,
    #invoice * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }


        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    #invoice::-webkit-scrollbar,
    #invoice *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }


        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .admin-card,
    .card,
    .document-brand,
    .doc-section,
    .document-summary,
    .admin-table,
    .admin-table th,
    .admin-table td {
        box-shadow: none !important;
        overflow: visible !important;
    }


        box-shadow: none !important;
        overflow: visible !important;
    }

    .document-brand {
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 8mm !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }


        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 8mm !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .doc-meta,
    .document-summary,
    .doc-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }


        page-break-inside: avoid;
        break-inside: avoid;
    }

    .invoice-title {
        color: #111 !important;
        margin: 6mm 0 !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
    }


        color: #111 !important;
        margin: 6mm 0 !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
    }

    .company,
    .doc-meta,
    .doc-meta-right {
        color: #111 !important;
    }


        color: #111 !important;
    }

    .admin-table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: table;
        table-layout: fixed !important;
        white-space: normal;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }


        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: table;
        table-layout: fixed !important;
        white-space: normal;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    .admin-table thead {
        display: table-header-group;
        background: #fff !important;
    }


        display: table-header-group;
        background: #fff !important;
    }

    .admin-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }


        page-break-inside: avoid;
        break-inside: avoid;
    }

    .admin-table th,
    .admin-table td {
        padding: 6px 7px !important;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        color: #111 !important;
        background: #fff !important;
    }


        padding: 6px 7px !important;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        color: #111 !important;
        background: #fff !important;
    }

    .admin-table tbody tr:last-child td,
    #invoice > *:last-child {
        border-bottom: none !important;
    }


        border-bottom: none !important;
    }

    .document-footer {
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }


        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
}

body {
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
