* {
    box-sizing: border-box;
}

:root {
    --bg: #f3efe7;
    --bg-soft: #faf7f1;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: #ffffff;
    --text: #1c2430;
    --muted: #5d6776;
    --line: rgba(33, 41, 58, 0.12);
    --primary: #0f766e;
    --primary-deep: #0b5f58;
    --accent: #cb6d3e;
    --accent-soft: #f4d4c5;
    --shadow: 0 22px 60px rgba(17, 24, 39, 0.14);
    --shadow-soft: 0 12px 30px rgba(17, 24, 39, 0.1);
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(203, 109, 62, 0.14), transparent 30%),
        radial-gradient(circle at left bottom, rgba(15, 118, 110, 0.14), transparent 28%),
        linear-gradient(180deg, #fffdf8 0%, var(--bg) 100%);
}

body {
    position: relative;
}

body.admin-page {
    background:
        radial-gradient(circle at top right, rgba(38, 132, 204, 0.18), transparent 28%),
        radial-gradient(circle at left bottom, rgba(15, 118, 110, 0.12), transparent 28%),
        linear-gradient(180deg, #eef5fb 0%, #e4edf6 100%);
}

body.admin-login-page {
    color: #fff;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 24%),
        radial-gradient(circle at left 18%, rgba(255, 255, 255, 0.08), transparent 18%),
        linear-gradient(180deg, #5ea8d7 0%, #57a1d0 35%, #4c97c7 100%);
}

body.admin-login-page::before {
    top: -10rem;
    right: -8rem;
    width: 24rem;
    height: 24rem;
    background: rgba(255, 255, 255, 0.22);
    opacity: 0.24;
    filter: blur(34px);
}

body.admin-login-page::after {
    bottom: -14rem;
    left: -8rem;
    width: 30rem;
    height: 30rem;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0.18;
    filter: blur(34px);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: -8rem;
    right: -10rem;
    background: #cb6d3e;
}

body::after {
    bottom: -12rem;
    left: -10rem;
    background: #0f766e;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: inherit;
}

.container {
    width: min(1200px, 92%);
    margin: auto;
}

.site-menu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.site-header {
    background: rgba(13, 18, 28, 0.9);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(13, 18, 28, 0.18);
}

.site-header .container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-brand {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.site-header h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0.08em;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-menu-button {
    display: none;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    flex-shrink: 0;
}

.site-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    display: block;
}

.site-menu-backdrop {
    display: none;
}

.site-header a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-header a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-1px);
}

.site-header .site-brand {
    padding: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
}

.site-header .site-brand:hover {
    background: transparent;
    transform: none;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-copy {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 62ch;
}

.hero-shell,
.chooser-page main {
    padding: 28px 0 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 28px;
    align-items: center;
    padding: 32px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 244, 0.74));
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.hero-copy h2,
.chooser-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 4vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.hero-copy p,
.chooser-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.02rem;
    max-width: 60ch;
}

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

.btn {
    background: linear-gradient(180deg, var(--primary), var(--primary-deep));
    color: white;
    border: 0;
    padding: 12px 18px;
    text-decoration: none;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.24);
    filter: brightness(1.03);
}

.btn-secondary {
    background: rgba(28, 36, 48, 0.06);
    color: var(--text);
    box-shadow: none;
    border: 1px solid rgba(28, 36, 48, 0.08);
}

.btn-secondary:hover {
    background: rgba(28, 36, 48, 0.1);
    box-shadow: none;
}

.btn-secondary.btn-interior,
.btn-secondary.btn-exterior {
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

.btn-secondary.btn-interior {
    background: linear-gradient(180deg, #1a8f86, #0f766e);
}

.btn-secondary.btn-interior:hover {
    background: linear-gradient(180deg, #14968d, #0b5f58);
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.25);
}

.btn-secondary.btn-exterior {
    background: linear-gradient(180deg, #d97945, #b85d31);
}

.btn-secondary.btn-exterior:hover {
    background: linear-gradient(180deg, #e18450, #a94f22);
    box-shadow: 0 16px 28px rgba(203, 109, 62, 0.24);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.stat-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(28, 36, 48, 0.08);
    box-shadow: var(--shadow-soft);
}

.stat-card strong,
.feature-card h3,
.choice-card h3,
.chooser-copy h2 {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.stat-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--primary-deep);
}

.stat-card span {
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.95rem;
}

.hero-panel {
    position: relative;
    min-height: 480px;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(21, 27, 37, 0.03), rgba(21, 27, 37, 0.08)),
        linear-gradient(135deg, #efe2d6 0%, #f9f1e8 50%, #dde9e7 100%);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.hero-swatch {
    position: absolute;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
}

.swatch-1 {
    inset: 28px auto auto 28px;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #efc7ab, #cf784f);
}

.swatch-2 {
    inset: 42px 42px auto auto;
    width: 110px;
    height: 190px;
    background: linear-gradient(180deg, #163b45, #0f766e);
}

.swatch-3 {
    inset: auto auto 34px 36px;
    width: 170px;
    height: 108px;
    background: linear-gradient(135deg, #f7f0e7, #d8cab8);
}

.swatch-4 {
    inset: auto 36px 34px auto;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #e7d0c1, #b86238);
}

.hero-preview-card {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: min(360px, calc(100% - 40px));
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.16);
}

.hero-preview-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(203, 109, 62, 0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-preview-card strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.hero-preview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    padding-bottom: 12px;
}

.feature-card,
.note-card,
.choice-card,
.chooser-copy,
.chooser-note {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.feature-card {
    padding: 22px;
    border-radius: 22px;
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.chooser-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 18px;
    align-items: stretch;
    margin-top: 28px;
}

.chooser-copy,
.chooser-note {
    border-radius: 26px;
    padding: 26px;
}

.chooser-note {
    display: grid;
    gap: 14px;
}

.note-card {
    border-radius: 20px;
    padding: 18px;
}

.note-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-deep);
    font-size: 1rem;
}

.note-card span {
    color: var(--muted);
    line-height: 1.7;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0 6px;
}

.choice-card {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 28px;
    text-decoration: none;
    min-height: 280px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.choice-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(17, 24, 39, 0.16);
}

.choice-card::after {
    content: "";
    position: absolute;
    inset: auto -32px -32px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    opacity: 0.14;
    filter: blur(8px);
}

.choice-card-interior {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.11), rgba(255, 255, 255, 0.88));
}

.choice-card-interior::after {
    background: #0f766e;
}

.choice-card-exterior {
    background: linear-gradient(135deg, rgba(203, 109, 62, 0.13), rgba(255, 255, 255, 0.88));
}

.choice-card-exterior::after {
    background: #cb6d3e;
}

.choice-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(28, 36, 48, 0.08);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.choice-card h3 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    line-height: 1.05;
}

.choice-card p {
    margin: 0;
    max-width: 34ch;
    color: var(--muted);
    line-height: 1.8;
}

.choice-link {
    display: inline-flex;
    margin-top: 22px;
    color: var(--primary-deep);
    font-weight: 700;
}

.chooser-page .site-footer {
    margin-top: 28px;
}

.visualizer-page {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 26px;
    padding: 28px;
    margin-top: 24px;
    margin-bottom: 8px;
    align-items: start;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.visualizer-left,
.visualizer-right {
    min-width: 0;
}

.visualizer-left h2,
.visualizer-right h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 2vw, 2rem);
}

#roomSelect,
#searchInput,
select,
input[type="text"],
input[type="search"] {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(28, 36, 48, 0.12);
    border-radius: 14px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.96);
    outline: none;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

#searchInput {
    margin-bottom: 15px;
}

.download-area {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 245, 238, 0.9));
    padding: 18px;
    border-radius: 22px;
    margin-top: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(28, 36, 48, 0.08);
    box-shadow: var(--shadow-soft);
}

.preview-box {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background: #ddd;
}

.room-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.empty-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #666;
    background: linear-gradient(135deg, #efefef, #dddddd);
}

.paint-layer {
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0.82;
    mix-blend-mode: multiply;
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: cover;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    pointer-events: none;
}

.download-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 16px;
    border: 1px solid rgba(28, 36, 48, 0.08);
}

.download-swatch-row {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.selected-swatch {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    border: 1px solid rgba(28, 36, 48, 0.15);
    flex: 0 0 90px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.download-text-info {
    min-width: 0;
}

.download-text-info h3,
#selectedColorName {
    margin: 0 0 8px;
    color: #111;
    font-size: 32px;
    line-height: 1.15;
    word-break: break-word;
}

.download-text-info p,
#selectedColorCode,
#selectedColorFamily {
    margin: 4px 0;
    color: #333;
    font-size: 17px;
    line-height: 1.4;
    word-break: break-word;
}

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

.selected-color-actions .btn {
    min-width: 160px;
}

.family-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.family-tab {
    border: 1px solid rgba(28, 36, 48, 0.12);
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 999px;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.family-tab:hover {
    transform: translateY(-1px);
}

.family-tab.active {
    background: linear-gradient(180deg, var(--primary), var(--primary-deep));
    color: white;
    border-color: var(--primary-deep);
}

.visualizer-right {
    min-width: 0;
    position: sticky;
    top: 94px;
    align-self: start;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.visualizer-right h2,
.visualizer-right #searchInput,
.visualizer-right .family-tabs {
    flex-shrink: 0;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    scroll-behavior: smooth;
}

.color-grid::-webkit-scrollbar {
    width: 8px;
}

.color-grid::-webkit-scrollbar-track {
    background: #e5e5e5;
    border-radius: 10px;
}

.color-grid::-webkit-scrollbar-thumb {
    background: #b8b8b8;
    border-radius: 10px;
}

.color-grid::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.color-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(28, 36, 48, 0.08);
    padding: 10px;
    border-radius: 16px;
    cursor: pointer;
    min-width: 0;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-card:hover {
    border-color: rgba(15, 118, 110, 0.5);
    box-shadow: 0 14px 26px rgba(17, 24, 39, 0.1);
    transform: translateY(-1px);
}

.color-card.active {
    border: 2px solid var(--primary);
}

.color-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 1px solid rgba(28, 36, 48, 0.12);
    flex: 0 0 50px;
}

.color-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.color-info strong,
.color-info span,
.color-info small {
    overflow-wrap: break-word;
    word-break: break-word;
}

.color-info strong {
    font-size: 15px;
}

.color-info span,
.color-info small {
    font-size: 13px;
    color: #555;
}

.site-footer {
    background: rgba(13, 18, 28, 0.96);
    color: white;
    text-align: center;
    padding: 16px 0;
    margin-top: 28px;
}

.admin-footer {
    margin-top: 28px;
    padding: 16px 0;
    background: rgba(13, 18, 28, 0.96);
    color: #fff;
    text-align: center;
}

.admin-header {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(12, 18, 30, 0.95));
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}

.admin-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
}

.admin-brand span {
    display: inline-block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin-brand strong {
    display: block;
    font-size: 24px;
    letter-spacing: 0.05em;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.86);
}

.admin-account span {
    font-size: 14px;
}

.admin-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.admin-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0 16px;
}

.admin-nav-inner a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.admin-nav-inner a:hover,
.admin-nav-inner a.active {
    background: rgba(15, 118, 110, 0.24);
    color: #fff;
    transform: translateY(-1px);
}

.admin-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(12, 74, 110, 0.9));
    color: #fff;
}

.admin-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
}

.admin-topbar-kicker {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.admin-topbar strong {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.admin-topbar p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.admin-topbar-user {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
}

.admin-topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-topbar-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.12);
}

.admin-topbar-actions a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-shell {
    padding: 28px 0 0;
}

.admin-hero,
.admin-dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    padding: 26px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(242, 234, 224, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
}

.admin-dashboard-hero {
    align-items: center;
    margin-bottom: 18px;
}

.admin-dashboard-hero-blue {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f4e7d 0%, #16648f 48%, #1d79ae 100%);
}

.admin-dashboard-hero-blue::after {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(6px);
}

.admin-dashboard-hero-blue .page-kicker {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.admin-dashboard-hero-blue .admin-dashboard-copy h2 {
    color: #fff;
}

.admin-dashboard-hero-blue .admin-dashboard-copy p {
    color: rgba(255, 255, 255, 0.84);
}

.admin-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: min(360px, 100%);
}

.admin-dashboard-metric {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.admin-dashboard-metric span {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-dashboard-metric strong {
    display: block;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}

.admin-chart-panel {
    margin: 18px 0;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(229, 242, 251, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.admin-chart-panel .admin-panel-head {
    margin-bottom: 10px;
}

.admin-chart-legend {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-chart-legend-mark {
    width: 42px;
    height: 16px;
    border-radius: 4px;
    border: 3px solid #4ec5ca;
    background: rgba(78, 197, 202, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.admin-chart-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.admin-chart-scroll {
    overflow-x: auto;
    margin-top: 18px;
}

.admin-line-chart {
    display: block;
    width: 100%;
    min-width: 860px;
    height: auto;
}

.admin-chart-grid-line {
    stroke: rgba(73, 87, 109, 0.12);
    stroke-width: 1;
}

.admin-chart-grid-line-vertical {
    stroke: rgba(73, 87, 109, 0.08);
}

.admin-chart-axis-label,
.admin-chart-x-label {
    fill: var(--muted);
    font-size: 12px;
}

.admin-chart-x-label {
    font-size: 11px;
}

.admin-chart-area {
    fill: url(#visitorAreaGradient);
}

.admin-chart-line {
    fill: none;
    stroke: #4ec5ca;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-chart-point {
    fill: #fff;
    stroke: #4ec5ca;
    stroke-width: 3;
}

.admin-collection-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0;
}

.admin-collection-card {
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 245, 251, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.admin-collection-card span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-collection-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 2.2rem;
    color: var(--text);
}

.admin-collection-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.admin-login-card {
    width: min(720px, 100%);
    display: grid;
    gap: 18px;
    align-items: start;
}

.admin-login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 16px;
}

.admin-login-stage {
    position: relative;
    width: min(470px, 100%);
}

.admin-login-stage-simple {
    width: min(410px, 100%);
}

.admin-login-page .admin-login-card {
    position: relative;
    margin-top: 0;
    padding: 36px 34px 28px;
    border-radius: 8px 8px 10px 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, #f2c94c, #2f80ed) 1;
    box-shadow: 0 24px 48px rgba(29, 86, 132, 0.18);
    backdrop-filter: blur(8px);
}

.admin-login-page .admin-login-copy {
    text-align: center;
}

.admin-login-page .admin-login-copy h1 {
    margin: 6px 0 18px;
    font-size: clamp(2rem, 4vw, 2.6rem);
    letter-spacing: 0;
    font-weight: 700;
    color: #152536;
}

.admin-login-page .admin-login-form {
    gap: 14px;
}

.admin-login-field {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: #6c7a88;
}

.admin-login-page .admin-field-input input {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    font-size: 15px;
}

.admin-login-page .admin-login-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #cbd6e2;
    background: #fff;
    color: #152536;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.admin-login-page .admin-login-field input::placeholder {
    color: #7e8b99;
}

.admin-login-button {
    width: 100%;
    margin: 8px auto 0;
    background: linear-gradient(90deg, #0f766e 0%, #2f80ed 100%);
    box-shadow: 0 14px 24px rgba(34, 97, 148, 0.22);
    letter-spacing: 0.02em;
}

.admin-dashboard-copy h2,
.admin-hero h2,
.admin-login-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 3vw, 3rem);
    line-height: 1.05;
}

.admin-dashboard-copy p,
.admin-hero p,
.admin-login-copy p {
    margin: 0;
    max-width: 58ch;
    color: var(--muted);
    line-height: 1.7;
}

.admin-dashboard-actions,
.admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.admin-stat-grid,
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.admin-stat-card {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(229, 242, 251, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.admin-stat-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 2rem;
    line-height: 1;
    color: var(--primary-deep);
}

.admin-stat-card span {
    color: var(--muted);
}

.admin-stat-grid-blue .admin-stat-card {
    border-color: rgba(255, 255, 255, 0.96);
}

.admin-log-list {
    display: grid;
    gap: 12px;
}

.admin-log-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 118, 110, 0.06);
    border: 1px solid rgba(15, 118, 110, 0.1);
}

.admin-log-item strong {
    display: block;
    margin-bottom: 6px;
}

.admin-log-item span,
.admin-log-item small {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}

.admin-log-summary {
    margin: 10px 0 0;
    color: var(--text);
    line-height: 1.6;
    font-size: 13px;
}

.admin-log-warn {
    background: rgba(203, 109, 62, 0.09);
    border-color: rgba(203, 109, 62, 0.15);
}

.admin-log-error {
    background: rgba(180, 35, 24, 0.08);
    border-color: rgba(180, 35, 24, 0.14);
}

.admin-panel-compact {
    padding: 18px;
}

.admin-color-format {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 118, 110, 0.06);
    border: 1px solid rgba(15, 118, 110, 0.08);
    grid-column: 1 / -1;
}

.admin-color-format label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
    align-items: stretch;
    position: relative;
}

.admin-sidebar-toggle-state {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 22px 18px 18px;
    color: #fff;
    background: linear-gradient(180deg, #103457 0%, #0c2743 100%);
    box-shadow: 18px 0 38px rgba(9, 28, 52, 0.18);
    z-index: 22;
}

.admin-sidebar-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.admin-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.admin-sidebar-brand span {
    display: inline-block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-sidebar-brand strong {
    display: block;
    font-size: 25px;
    line-height: 1.08;
    letter-spacing: 0.02em;
}

.admin-sidebar-brand p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    font-size: 13px;
}

.admin-sidebar-user {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-user span {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    line-height: 1.5;
}

.admin-sidebar-nav {
    display: grid;
    gap: 8px;
    flex: 0 0 auto;
    align-content: start;
    grid-auto-rows: min-content;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    background: linear-gradient(180deg, rgba(73, 145, 208, 0.58), rgba(32, 107, 168, 0.58));
    color: #fff;
    transform: translateX(2px);
}

.admin-sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.74);
}

.admin-sidebar-footer span {
    display: block;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin-sidebar-footer strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.admin-content-shell {
    min-width: 0;
    padding-bottom: 0;
}

.admin-mobilebar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(28, 36, 48, 0.08);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
    position: sticky;
    top: 0;
    z-index: 25;
}

.admin-mobilebar-copy strong,
.admin-mobilebar-copy span {
    display: block;
}

.admin-mobilebar-copy strong {
    font-size: 16px;
}

.admin-mobilebar-copy span {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-drawer-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #0f4e7d, #12355d);
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(15, 78, 125, 0.18);
    text-decoration: none;
    user-select: none;
}

.admin-drawer-toggle span {
    width: 18px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: #fff;
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 21;
    border: 0;
    background: rgba(9, 17, 28, 0.46);
    cursor: pointer;
    padding: 0;
}

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

#adminMenuToggle:checked ~ .admin-layout .admin-sidebar-backdrop {
    display: block;
}

#adminMenuToggle:checked ~ .admin-layout .admin-sidebar {
    transform: translateX(0);
}

body.admin-sidebar-open {
    overflow: hidden;
}

body:has(#adminMenuToggle:checked) {
    overflow: hidden;
}

.admin-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 1fr;
    gap: 18px;
    margin-bottom: 10px;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.admin-dashboard-grid-home {
    align-items: start;
}

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

.admin-panel {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.admin-panel-head {
    margin-bottom: 14px;
}

.admin-panel-head h2,
.admin-panel-head h3 {
    margin: 0 0 8px;
}

.admin-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.admin-links {
    display: grid;
    gap: 12px;
}

.admin-links a {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    background: rgba(15, 118, 110, 0.08);
    color: var(--text);
    border: 1px solid rgba(15, 118, 110, 0.08);
}

.admin-links a:hover {
    background: rgba(15, 118, 110, 0.12);
}

.admin-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 16px;
}

.admin-search-bar input {
    flex: 1 1 280px;
}

.admin-search-bar .btn,
.admin-search-bar a.btn {
    min-width: 110px;
}

.admin-success {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--primary-deep);
    border: 1px solid rgba(15, 118, 110, 0.18);
}

.admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    color: var(--muted);
}

.admin-pagination-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-upload-field {
    display: grid;
    gap: 8px;
}

.admin-preview-stack {
    display: grid;
    gap: 8px;
}

.admin-preview-stack label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.upload-preview-img {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(28, 36, 48, 0.12);
    background: linear-gradient(135deg, #e6ebf1, #dce3ea);
}

.upload-preview-img.is-empty {
    opacity: 0.65;
}

.room-edit-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.admin-permission-box {
    grid-column: 1 / -1;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 118, 110, 0.06);
    border: 1px solid rgba(15, 118, 110, 0.08);
}

.admin-permission-box > span {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-deep);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-permission-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-permission-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(28, 36, 48, 0.08);
}

.admin-permission-list span {
    font-size: 14px;
}

.admin-form-users {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-users .btn {
    grid-column: 1 / -1;
}

.admin-form-rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-rooms .btn {
    grid-column: 1 / -1;
}

.admin-form-rooms input[name="room_name"] {
    grid-column: 1 / -1;
}

.admin-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-form-grid .btn {
    grid-column: 1 / -1;
}

.admin-form-single {
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-form-single .btn {
    grid-column: auto;
}

.room-thumb {
    max-width: 120px;
}

.status-pill {
    white-space: nowrap;
}

.admin-room-cards {
    display: grid;
    gap: 14px;
}

.admin-room-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 118, 110, 0.06);
}

.admin-room-card img,
.room-edit-preview img,
.room-thumb {
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(28, 36, 48, 0.1);
}

.admin-room-card img,
.room-thumb {
    aspect-ratio: 16 / 10;
}

.room-edit-preview {
    margin-bottom: 16px;
}

.room-edit-preview img {
    max-width: 240px;
    aspect-ratio: 16 / 10;
}

.admin-room-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.admin-room-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}

.admin-table-wrap {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(28, 36, 48, 0.08);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.admin-swatch {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(28, 36, 48, 0.12);
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-form-single {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
}

.admin-form-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-form-rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-rooms button {
    grid-column: 1 / -1;
    justify-self: start;
}

.admin-form .btn {
    justify-self: start;
    min-width: 160px;
}

.btn-small {
    padding: 9px 13px;
    font-size: 13px;
    min-width: auto;
}

.btn-danger {
    background: linear-gradient(180deg, #d9463f, #b42318);
    box-shadow: 0 12px 24px rgba(180, 35, 24, 0.18);
}

.btn-danger:hover {
    box-shadow: 0 16px 28px rgba(180, 35, 24, 0.22);
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.status-on {
    background: rgba(15, 118, 110, 0.12);
    color: var(--primary-deep);
}

.status-off {
    background: rgba(180, 35, 24, 0.12);
    color: #9f1d12;
}

.admin-login-page .site-header nav {
    display: none;
}

.admin-login-shell {
    min-height: calc(100vh - 160px);
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.admin-login-form {
    display: grid;
    gap: 14px;
}

.admin-login-form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

.admin-login-form input {
    width: 100%;
}

.admin-login-hint {
    margin: 12px 0 0;
    color: var(--muted);
}

.admin-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(203, 109, 62, 0.12);
    color: #7a3412;
    border: 1px solid rgba(203, 109, 62, 0.18);
}

/* =========================
   TABLET
========================= */
@media (max-width: 991px) {
    .hero-grid,
    .chooser-hero,
    .visualizer-page,
    .feature-grid,
    .choice-grid,
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: 380px;
    }

    .visualizer-page {
        top: 0;
    }

    .visualizer-right {
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
    }

    .color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 520px;
        flex: initial;
    }

    .download-text-info h3,
    #selectedColorName {
        font-size: 26px;
    }

    .download-text-info p,
    #selectedColorCode,
    #selectedColorFamily {
        font-size: 16px;
    }

    .admin-hero,
    .admin-dashboard-hero,
    .admin-grid,
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 86vw);
        overflow: auto;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 26;
    }

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

    .admin-dashboard-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-hero,
    .admin-dashboard-hero,
    .admin-login-card {
        display: grid;
        align-items: start;
    }

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

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

    .admin-form-single,
    .admin-form-grid,
    .admin-form-rooms {
        grid-template-columns: 1fr 1fr;
    }

    .admin-form-single button,
    .admin-form-grid button,
    .admin-form-rooms button {
        grid-column: 1 / -1;
    }

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

    .admin-login-shell {
        min-height: auto;
    }

    .admin-login-stage {
        width: min(410px, 100%);
    }

    .admin-login-page .admin-login-card {
        padding: 30px 20px 22px;
        border-radius: 8px 8px 10px 10px;
    }

    .admin-login-button {
        width: 100%;
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 767px) {
    .container {
        width: 94%;
    }

    .site-header .container {
        flex-direction: row;
        align-items: center;
    }

    .site-header nav {
        width: auto;
    }

    .site-menu-button {
        display: inline-flex;
    }

    .site-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(7, 11, 18, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
        z-index: 24;
    }

    .site-nav-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: min(84vw, 320px);
        height: 100vh;
        padding: 88px 18px 18px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: linear-gradient(180deg, rgba(13, 18, 28, 0.98), rgba(18, 26, 40, 0.98));
        box-shadow: 18px 0 50px rgba(0, 0, 0, 0.28);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 30;
    }

    .site-nav-drawer a {
        width: 100%;
        padding: 12px 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.06);
    }

    .site-nav-drawer a:hover {
        background: rgba(255, 255, 255, 0.14);
    }

    .site-menu-toggle:checked ~ .site-header .site-nav-drawer {
        transform: translateX(0);
    }

    .site-menu-toggle:checked ~ .site-header .site-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-account {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-nav-inner {
        padding-bottom: 14px;
    }

    .admin-sidebar {
        padding: 18px 16px 16px;
    }

    .admin-sidebar-head {
        align-items: flex-start;
    }

    .admin-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-mobilebar {
        display: flex;
        z-index: 25;
    }

    .admin-sidebar-backdrop {
        display: none;
        z-index: 24;
    }

    .admin-footer {
        left: 0;
        width: 100%;
    }

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

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

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

    .hero-shell,
    .chooser-page main {
        padding-top: 18px;
    }

    .hero-grid,
    .chooser-copy,
    .chooser-note,
    .visualizer-page {
        padding: 20px;
    }

    .hero-grid,
    .visualizer-page {
        gap: 20px;
    }

    .hero-stats {
        gap: 12px;
    }

    .download-area {
        padding: 14px;
    }

    .download-info {
        padding: 14px;
    }

    .download-swatch-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .selected-swatch {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .hero-preview-card {
        width: calc(100% - 24px);
    }

    .choice-card h3 {
        font-size: 1.55rem;
    }

    .download-text-info h3,
    #selectedColorName {
        font-size: 22px;
    }

    .download-text-info p,
    #selectedColorCode,
    #selectedColorFamily {
        font-size: 15px;
    }

    .hero-actions,
    .selected-color-actions {
        flex-direction: column;
    }

    .hero-actions .btn,
    .selected-color-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .choice-grid,
    .feature-grid {
        gap: 14px;
    }

    .admin-hero-actions {
        justify-content: flex-start;
    }

    .admin-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-stat-grid,
    .admin-stats,
    .admin-form,
    .admin-form-single,
    .admin-form-grid,
    .admin-form-rooms {
        grid-template-columns: 1fr;
    }

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

    .admin-form .btn,
    .admin-form-single .btn,
    .admin-form-grid .btn,
    .admin-form-rooms .btn {
        width: 100%;
        min-width: 0;
    }

    .admin-login-stage {
        width: 100%;
    }

    .admin-login-page .admin-login-card {
        margin-top: 48px;
        padding: 72px 18px 22px;
    }

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

    .room-edit-preview img {
        max-width: 100%;
    }

    .admin-permission-list,
    .room-edit-preview-grid {
        grid-template-columns: 1fr;
    }

    .color-grid {
        grid-template-columns: 1fr;
        max-height: 420px;
    }

    .color-card {
        padding: 12px;
    }

    .family-tab {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* =========================
   SMALL MOBILE
========================= */
@media (max-width: 480px) {
    .site-header h1 {
        font-size: 20px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .preview-box {
        border-radius: 14px;
    }

    .download-text-info h3,
    #selectedColorName {
        font-size: 20px;
    }

    .download-text-info p,
    #selectedColorCode,
    #selectedColorFamily {
        font-size: 14px;
    }

    .color-box {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}
