/* Version 1.0.9 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
    /* Unified light theme */
    --bg-primary: #f4f7fb;
    --bg-secondary: #ffffff;
    --border: rgba(148, 163, 184, 0.25);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #f97316;
    --brand: #fb923c;
    --brand-strong: #ea580c;
    --surface-border: rgba(148, 163, 184, 0.22);
    --surface-radius: 18px;
    --surface-shadow: 0 20px 45px rgba(15, 23, 42, 0.12), 0 8px 24px rgba(15, 23, 42, 0.1);
    --surface-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82));
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: radial-gradient(900px 620px at 12% 0%, rgba(37, 99, 235, 0.08), transparent 60%),
        radial-gradient(640px 480px at 90% 8%, rgba(14, 165, 233, 0.08), transparent 65%),
        var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

body.nav-open,
body.user-menu-open {
    overflow: hidden;
}

header {
    background: #ffffff;
    padding: 12px 24px;
    border-bottom: 1px solid var(--surface-border);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

body > header {
    position: relative;
    z-index: 2000;
}

header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 32px;
}

.app-name {
    margin: 0;
}

.app-name a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 24px;
    display: inline-flex;
    align-items: center;
}

.app-logo {
    display: block;
    height: 48px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px;
    margin: 0;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.close-nav {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
}

.close-nav:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background-color: rgba(0, 0, 0, 0.05);
    outline: none;
}

.menu-toggle:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.menu-toggle-icon {
    position: relative;
    display: block;
    width: 20px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: background-color 0.2s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease, opacity 0.2s ease;
}

.menu-toggle-icon::before {
    top: -6px;
}

.menu-toggle-icon::after {
    bottom: -6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

.main-nav {
    margin-right: auto;
    min-width: 0;
    box-sizing: border-box;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--accent);
}

.user-menu {
    position: relative;
    margin-left: auto;
}

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

/* Unified button system */
.btn,
form input[type="submit"],
form button[type="submit"],
.update-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover,
.btn:focus-visible,
form input[type="submit"]:hover,
form input[type="submit"]:focus-visible,
form button[type="submit"]:hover,
form button[type="submit"]:focus-visible,
.update-button:hover,
.update-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(249, 115, 22, 0.32);
    filter: brightness(1.03);
    outline: none;
}

.btn:focus-visible,
form input[type="submit"]:focus-visible,
form button[type="submit"]:focus-visible,
.update-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.28), 0 22px 45px rgba(249, 115, 22, 0.3);
}

.btn--ghost,
form input[type="submit"].btn--ghost,
form button[type="submit"].btn--ghost,
.update-button.btn--ghost {
    background: rgba(249, 115, 22, 0.12);
    color: var(--brand-strong);
    border-color: rgba(249, 115, 22, 0.24);
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.18);
}

.btn--ghost:hover,
.btn--ghost:focus-visible,
form input[type="submit"].btn--ghost:hover,
form input[type="submit"].btn--ghost:focus-visible,
form button[type="submit"].btn--ghost:hover,
form button[type="submit"].btn--ghost:focus-visible,
.update-button.btn--ghost:hover,
.update-button.btn--ghost:focus-visible {
    background: rgba(249, 115, 22, 0.18);
}

.btn--sm,
.update-button {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.25);
}

.sort-order-input {
    width: 5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sort-order-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
    outline: none;
    background: #ffffff;
}

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

.is-hidden {
    display: none !important;
}

.user-icon {
    font-size: 28px;
    cursor: pointer;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    width: 220px;
    border-radius: 16px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow: hidden;
    box-sizing: border-box;
}

.user-dropdown.is-open {
    display: block;
}

.close-dropdown {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.close-dropdown:hover,
.close-dropdown:focus-visible {
    color: var(--brand-strong);
    outline: none;
}

.user-dropdown .email {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.82);
}

.user-dropdown .credits {
    margin: 0;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.user-dropdown .credits-label {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-dropdown .credits-total {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary);
}

.user-dropdown .credits-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--brand-strong);
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.user-dropdown .credits-add:hover,
.user-dropdown .credits-add:focus-visible {
    background: var(--brand-stronger, #ea580c);
    transform: scale(1.05);
    outline: none;
}

.user-dropdown .credits-add:focus-visible {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35);
}

.user-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.user-dropdown ul li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.user-dropdown ul li a:hover,
.user-dropdown ul li a:focus-visible {
    background: rgba(249, 115, 22, 0.16);
    color: var(--brand-strong);
    padding-left: 1.15rem;
    outline: none;
}

#main {
    display: flex;
    min-height: calc(100vh - 60px);
    gap: 24px;
    padding: 24px 32px 48px;
    box-sizing: border-box;
}

#content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: stretch;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(10px);
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.subscription-card {
    gap: 1.5rem;
}

.subscription-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.subscription-card-heading h2 {
    margin: 0;
    font-size: 1.65rem;
}

.subscription-card-subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.subscription-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: capitalize;
}

.subscription-status-badge--success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #166534;
}

.subscription-status-badge--warning {
    background: rgba(234, 88, 12, 0.15);
    border-color: rgba(234, 88, 12, 0.3);
    color: var(--brand-strong);
}

.subscription-message {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.16);
    color: var(--text-primary);
}

.subscription-details {
    display: grid;
    gap: 0.85rem;
}

.subscription-detail {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.72);
}

.subscription-detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.subscription-detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.subscription-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.subscription-empty {
    margin: 0;
    color: var(--text-secondary);
}

#sidebar-left,
#sidebar-right {
    width: 260px;
    background: var(--surface-glass);
    padding: 24px;
    box-sizing: border-box;
    overflow: auto;
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(10px);
}

#sidebar-left {
    margin: 0 0 0 16px;
}

#sidebar-right {
    margin: 0 16px 0 0;
}

@media (max-width: 1024px) {
    #main {
        flex-direction: column;
        padding: 24px 20px 40px;
    }

    #sidebar-left,
    #sidebar-right {
        width: 100%;
        margin: 0;
    }
}

.sidebar h3 {
    margin-top: 20px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar ul li a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    display: block;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar ul li a:hover {
    background: rgba(249, 115, 22, 0.16);
    color: var(--brand-strong);
    transform: translateX(2px);
}

form {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(10px);
    padding: 24px;
    max-width: 640px;
    width: min(100%, 640px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card form {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: none;
    width: 100%;
    backdrop-filter: none;
}

.card form label {
    font-weight: 600;
}

form label {
    font-weight: 600;
    color: var(--text-primary);
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form select,
form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

form textarea {
    resize: vertical;
    min-height: 140px;
}

form input[type="text"]:focus,
form input[type="password"]:focus,
form input[type="email"]:focus,
form input[type="number"]:focus,
form select:focus,
form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
    outline: none;
    background: #ffffff;
}

#chat-loading {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#chat-loading .spinner {
    width: 24px;
    height: 24px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#chat-loading .loading-text {
    margin-bottom: 8px;
    color: var(--text-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#message p {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    margin: 0 0 1rem;
}

#message p.success {
    background: rgba(22, 163, 74, 0.16);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.35);
}

#message p.error {
    background: rgba(248, 113, 113, 0.15);
    color: #991b1b;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
}

table th,
table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-primary);
}

table th {
    background: rgba(37, 99, 235, 0.12);
    text-align: left;
    font-weight: 600;
}

table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.92);
}

table tr:hover td {
    background: rgba(249, 115, 22, 0.12);
}

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

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gallery-detail-actions.action-buttons {
    flex-direction: column;
    align-items: flex-start;
}

.gallery-detail-actions.action-buttons > p {
    margin: 0;
}

.action-buttons a,
.action-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(249, 115, 22, 0.24);
    background: rgba(249, 115, 22, 0.12);
    color: var(--brand-strong);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.2);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.action-buttons a:hover,
.action-buttons a:focus-visible,
.action-buttons button:hover,
.action-buttons button:focus-visible {
    background: rgba(249, 115, 22, 0.18);
    color: var(--brand-strong);
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.24);
    outline: none;
}

.action-buttons .delete-button {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: #b91c1c;
    box-shadow: 0 14px 30px rgba(248, 113, 113, 0.25);
}

.action-buttons .delete-button:hover,
.action-buttons .delete-button:focus-visible {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
    box-shadow: 0 18px 36px rgba(248, 113, 113, 0.28);
    transform: translateY(-1px);
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 24px 0;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.45rem 0.9rem;
    color: var(--brand-strong);
    text-decoration: none;
    border: 1px solid rgba(249, 115, 22, 0.24);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.2);
}

.pagination a:hover,
.pagination a:focus-visible {
    background: rgba(249, 115, 22, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.24);
    outline: none;
}

.pagination .current {
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 20px 42px rgba(249, 115, 22, 0.32);
}

/* Package listing cards */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
}

.payment-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.payment-badge img {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
}

.packages-payment-badge {
    margin: 32px auto 0;
}

.footer-payment-badge {
    margin-top: 8px;
}

.package-card {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    padding: 24px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

.package-card::before {
    content: '🎁';
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.package-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.16);
}

.package-card h3 {
    margin-top: 0;
}

.package-card-description {
    margin: 0 0 1.5rem;
    text-align: left;
    line-height: 1.5;
}

.package-card-description:last-child {
    margin-bottom: 1rem;
}

.package-card-description p {
    margin: 0 0 0.75rem;
}

.package-card-description ul,
.package-card-description ol {
    margin: 0 0 0.75rem 1.2rem;
    padding-left: 1.2rem;
    text-align: left;
}

.package-card-description li {
    margin-bottom: 0.35rem;
}

.package-card-description img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.package-price {
   font-weight: bold;
   color:#15803d; 
}

.start-btn,
.buy-btn,
.subscribed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.28);
}

.start-btn {
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    color: #ffffff;
}

.buy-btn {
    background: rgba(249, 115, 22, 0.12);
    color: var(--brand-strong);
    border-color: rgba(249, 115, 22, 0.24);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.22);
}

.subscribed-btn {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0.26));
    color: var(--text-secondary);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 16px 32px rgba(71, 85, 105, 0.22);
}

.start-btn:hover,
.start-btn:focus-visible,
.buy-btn:hover,
.buy-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(249, 115, 22, 0.34);
    filter: brightness(1.03);
    outline: none;
}

.subscribed-btn:hover,
.subscribed-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 52px rgba(30, 41, 59, 0.2);
    filter: brightness(1.05);
    outline: none;
}

footer {
    background: var(--surface-glass);
    color: var(--text-primary);
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

footer .container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
    text-decoration-color: transparent;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--brand-strong);
    text-decoration: underline;
    text-decoration-color: currentColor;
    outline: none;
}

@media (max-width: 768px) {
    header {
        padding: 3px 10px;
    }

    header .container {
        justify-content: space-between;
        gap: 12px;
    }

    .app-name a {
        font-size: 12px;
    }

    .user-icon {
        font-size: 20px;
    }

    .header-right {
        gap: 12px;
        justify-content: flex-end;
    }

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

    .user-menu {
        margin-left: 0;
        order: 1;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin-right: 0;
        background: var(--surface-glass);
        display: none;
        z-index: 3200;
        padding: calc(env(safe-area-inset-top, 0px) + 64px) 20px 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
        overflow-y: auto;
        border-left: 1px solid var(--surface-border);
        backdrop-filter: blur(12px);
        box-shadow: var(--surface-shadow);
        width: 100vw;
        max-width: 100%;
        height: 100vh;
        min-height: 100vh;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        width: 100%;
        font-size: 18px;
    }

    .close-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        margin-left: auto;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        transition: background-color 0.2s ease;
    }

    .close-nav:hover,
    .close-nav:focus-visible {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .user-dropdown {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100vw;
        max-width: 100%;
        height: 100vh;
        min-height: 100vh;
        border: none;
        border-radius: 0;
        z-index: 3200;
        padding: calc(env(safe-area-inset-top, 0px) + 72px) 20px 32px;
        overflow-y: auto;
    }

    .close-dropdown {
        display: block;
    }

    #main {
        flex-direction: column;
    }

    #sidebar-left,
    #sidebar-right {
        width: 100%;
        border: none;
        order: 2;
    }

    #content {
        order: 1;
    }
}
/* Chat options styles */
#upload-button, #options-toggle {
    background-color: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

#options-toggle.open {
    background-color: #e5e7eb;
}

#chat-form .chat-form-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

#options-container {
    display: none;
    margin-top: 10px;
}

.option-group {
    margin-bottom: 10px;
}

.option-label {
    display: block;
    margin: 6px 0 4px;
    font-weight: 600;
}

.option-bubble {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
}

.option-bubble.selected {
    background-color: var(--accent);
    color: #fff;
}

#chat-box {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px auto 0;
}

#preset-queries {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.chat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    --card-action-size: 32px;
    --card-action-gap: 10px;
    --card-action-offset: 8px;
    max-width: 1024px;
}

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

.chat-card .magic-icon,
.chat-card .download-icon,
.chat-card .upscale-icon,
.chat-card .gallery-add-icon,
.chat-card .gallery-edit-icon,
.chat-card .gallery-delete-icon {
    position: absolute;
    top: var(--card-action-offset);
    background: #fff;
    color: var(--text-primary);
    width: var(--card-action-size);
    height: var(--card-action-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.chat-card .upscale-icon.is-loading {
    color: transparent;
    pointer-events: none;
}

.chat-card .upscale-icon.is-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
    border-top-color: transparent;
    border-right-color: transparent;
    animation: chat-upscale-spin 0.75s linear infinite;
}

@keyframes chat-upscale-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.chat-card .magic-icon,
.chat-card .download-icon,
.chat-card .upscale-icon,
.chat-card .gallery-add-icon,
.chat-card .gallery-edit-icon,
.chat-card .gallery-delete-icon {
    z-index: 2;
}

.chat-card .download-icon,
.chat-card .upscale-icon,
.chat-card .gallery-delete-icon { right: var(--card-action-offset); }
.chat-card .magic-icon { right: calc(var(--card-action-offset) + var(--card-action-size) + var(--card-action-gap)); }
.chat-card .gallery-add-icon { right: calc(var(--card-action-offset) + (var(--card-action-size) + var(--card-action-gap)) * 2); }
.chat-card .gallery-edit-icon { right: calc(var(--card-action-offset) + var(--card-action-size) + var(--card-action-gap)); }

.chat-card .gallery-edit-icon {
    background: #e0f2fe;
    color: #0c4a6e;
    border-color: rgba(14, 116, 144, 0.35);
}

.chat-card .gallery-edit-icon:hover {
    background: #bae6fd;
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.25);
}

.chat-card .gallery-card-delete-form {
    position: absolute;
    top: var(--card-action-offset);
    right: var(--card-action-offset);
    margin: 0;
}

.chat-card .gallery-delete-icon {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(185, 28, 28, 0.35);
}

.chat-card .gallery-delete-icon:hover {
    background: #fecaca;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

.chat-card .gallery-add-icon.added {
    background: #dcfce7;
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.35);
}

.chat-card .magic-icon:hover,
.chat-card .download-icon:hover,
.chat-card .upscale-icon:hover,
.chat-card .gallery-add-icon:hover {
    background: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.gallery-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--surface-border);
}

.gallery-card-actions form {
    margin: 0;
    display: inline-flex;
}

.gallery-card-actions .gallery-card-delete-form {
    position: static;
}

.gallery-card-actions .gallery-card-action-button {
    position: static;
    top: auto;
    right: auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: transparent;
    color: var(--text-primary);
    padding: 0;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-card-actions .gallery-card-action-button:hover,
.gallery-card-actions .gallery-card-action-button:focus-visible {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(15, 23, 42, 0.28);
    transform: none;
    box-shadow: none;
}

.gallery-card-actions .gallery-card-action-button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.gallery-card-actions .gallery-edit-icon {
    color: #0c4a6e;
    border-color: rgba(14, 116, 144, 0.32);
}

.gallery-card-actions .gallery-delete-icon {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.32);
}

.gallery-filter {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.gallery-filter label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.gallery-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.gallery-filter-controls input {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-filter-controls input:focus-visible {
    outline: none;
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.gallery-filter-controls .btn {
    flex: 0 0 auto;
}

.gallery-tag-cloud {
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.gallery-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.85rem;
    line-height: 1.1;
}

.gallery-tag:hover,
.gallery-tag:focus-visible {
    background: rgba(79, 70, 229, 0.12);
    color: var(--brand-strong);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.18);
    outline: none;
}

.gallery-tag.is-active {
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    color: #ffffff;
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

.gallery-tag-count {
    font-size: 0.75rem;
    opacity: 0.75;
}

.gallery-card-tags {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.gallery-card-tags .gallery-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

.gallery-active-summary {
    margin: 0.5rem 0 1.5rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gallery-active-summary .gallery-tag {
    font-size: 0.8rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(50px, 3vw, 36px);
    margin-top: 24px;
    justify-items: center;
}

.gallery-card {
    max-width: 300px;
    width: 100%;
}

.gallery-card .gallery-thumb-link {
    display: block;
    border-radius: 16px;
    overflow: hidden;
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
}

.gallery-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.gallery-pagination__list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gallery-pagination__item {
    flex: 0 0 auto;
}

.gallery-pagination__link,
.gallery-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-pagination__link:hover,
.gallery-pagination__link:focus-visible {
    background: rgba(79, 70, 229, 0.12);
    color: var(--brand-strong);
    border-color: rgba(79, 70, 229, 0.32);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.18);
    outline: none;
}

.gallery-pagination__link.is-active {
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    color: #ffffff;
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
    cursor: default;
}

.gallery-pagination__link.is-active:hover,
.gallery-pagination__link.is-active:focus-visible {
    color: #ffffff;
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.gallery-pagination__ellipsis {
    pointer-events: none;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0.5rem 0.4rem;
}

.gallery-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.gallery-description {
    color: var(--text-secondary);
}

.gallery-tags-line {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    color: var(--text-secondary);
}

.gallery-tags-line strong {
    color: var(--text-primary);
}

.gallery-tags-line .gallery-tag {
    font-size: 0.8rem;
}

.gallery-empty {
    padding: 24px;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    max-width: 640px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.gallery-full-card {
    margin: 24px auto;
    max-width: 720px;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.gallery-full-card img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-detail-layout {
    margin: 24px auto 0;
    max-width: 960px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(320px, 1fr);
    gap: 2rem;
    align-items: start;
}

.gallery-detail-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(2, 32, 44, 0.35);
    border-radius: 12px;
    min-height: 220px;
    text-align: center;
}

.gallery-detail-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.gallery-detail-preview-empty {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gallery-detail-card {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    padding: 1.75rem;
    position: relative;
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .gallery-detail-layout {
        grid-template-columns: 1fr;
    }

    .gallery-detail-preview,
    .gallery-detail-card {
        max-width: 100%;
        box-sizing: border-box;
    }
}

.gallery-detail-title {
    margin: 0 0 1rem;
}

.gallery-detail-description {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.gallery-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.gallery-detail-tags-label {
    font-weight: 600;
    color: var(--text-primary);
}

.gallery-detail-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gallery-detail-tag-list .gallery-tag {
    font-size: 0.85rem;
}

.gallery-detail-actions {
    margin-bottom: 1.5rem;
}

.gallery-detail-actions a {
    text-decoration: none;
}

.gallery-download-button.is-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.gallery-download-status {
    display: none;
    min-height: 1.5rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.gallery-download-limit-message {
    margin-top: 0.75rem;
    color: #dc2626;
    font-size: 0.95rem;
    font-weight: 500;
}

.gallery-download-status.is-visible {
    display: block;
}

.gallery-download-status__content {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-download-status__spinner {
    display: inline-block;
    flex: 0 0 20px;
    width: 20px;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    box-sizing: border-box;
    animation: spin 1s linear infinite;
}

.gallery-detail-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.gallery-detail-admin-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.gallery-detail-admin-actions form {
    margin: 0;
    display: inline-flex;
}

.gallery-detail-action-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    padding: 0;
    box-shadow: none;
}

.gallery-detail-action-button:hover,
.gallery-detail-action-button:focus-visible {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(15, 23, 42, 0.28);
}

.gallery-detail-action-button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.gallery-detail-edit-link {
    color: #0c4a6e;
    border-color: rgba(14, 116, 144, 0.32);
}

.gallery-detail-chat-link {
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.28);
}

.gallery-detail-delete-button {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.32);
}

.gallery-detail-full {
    margin: 32px auto 0;
    max-width: 960px;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.gallery-detail-full img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-meta {
    color: var(--text-secondary);
    margin-top: 12px;
    text-align: center;
}

.gallery-admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.gallery-admin-table th,
.gallery-admin-table td {
    vertical-align: top;
    padding: 0.75rem 0.6rem;
    text-align: left;
}

.gallery-import-queue {
    margin-top: 2.5rem;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    padding: 1.5rem;
}

.gallery-import-queue h3 {
    margin-top: 0;
}

.queue-status-summary {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    padding: 0;
    margin: 0 0 1rem 0;
    flex-wrap: wrap;
}

.queue-status-summary li {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
}

.button.button--danger {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.button.button--danger:hover,
.button.button--danger:focus {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.queue-error-row td {
    background: rgba(239, 68, 68, 0.08);
    border-top: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.queue-error-row strong {
    display: inline-block;
    margin-right: 0.5rem;
}

.muted {
    color: var(--text-secondary);
    opacity: 0.7;
}

.gallery-admin-select {
    width: 48px;
    text-align: center;
}

.gallery-admin-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.gallery-admin-thumb {
    width: 140px;
}

.gallery-admin-thumb img {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.gallery-admin-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.gallery-admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
}

.gallery-admin-links .button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-tag-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-tag-filter select {
    min-width: 200px;
}

.gallery-tag-filter-summary {
    margin-bottom: 1rem;
    font-style: italic;
}

.gallery-admin-actions form {
    display: inline;
}

.gallery-admin-actions .button-link {
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.gallery-admin-actions button.button-link {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

.gallery-admin-actions button.button-link:hover,
.gallery-admin-actions button.button-link:focus-visible {
    color: var(--brand-strong);
    outline: none;
}

.gallery-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.gallery-selection-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.gallery-admin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 140px;
}

.gallery-admin-tags .gallery-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
}

.gallery-tag-table .gallery-tag-edit-form {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-tag-table .tag-prefix {
    font-weight: 600;
}

.gallery-tag-table input[type="text"] {
    min-width: 160px;
}

.gallery-tag-table button {
    padding: 0.25rem 0.75rem;
}

.gallery-admin-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
}

.gallery-admin-preview {
    flex: 0 1 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 1.5rem;
    background: rgba(2, 32, 44, 0.35);
    border-radius: 12px;
    text-align: center;
}

.gallery-admin-preview img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.gallery-admin-preview-empty {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gallery-admin-form {
    flex: 1 1 320px;
    display: grid;
    gap: 1rem;
}

.gallery-admin-form input,
.gallery-admin-form textarea {
    width: 100%;
}

.gallery-admin-form .form-help {
    margin-top: -0.35rem;
    margin-bottom: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gallery-admin-form .form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
}

#image-url-indicator {
    margin-left: 8px;
    opacity: 0;
    display: none;
    transition: opacity 1s;
}
#image-url-indicator.visible {
    display: inline;
    opacity: 1;
}
#image-url-indicator span { cursor: pointer; }

.preset-card {
    cursor: pointer;
    padding: 20px;
}

.results-separator {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.results-separator::before,
.results-separator::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.results-separator span {
    margin: 0 10px;
    font-weight: bold;
    color: var(--text-primary);
}

#history-list {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.history-item {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
    padding: 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(10px);
}

.history-item:hover,
.history-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
    outline: none;
}

.history-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.history-thumb-wrapper {
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.history-thumb {
    display: block;
    width: 100%;
    height: auto;
}

@supports (aspect-ratio: 4 / 3) {
    .history-thumb-wrapper {
        aspect-ratio: 4 / 3;
    }

    .history-thumb {
        height: 100%;
        object-fit: cover;
    }
}

#history-results {
    width: 100%;
    max-width: 1000px;
    display: none;
}

#history-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

#history-cards .chat-card {
    font-size: 1.1em;
}

.history-link {
    margin-top: 10px;
}

/* Landing page */
body.landing-body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background: radial-gradient(1600px 820px at 80% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
        radial-gradient(1200px 720px at -10% 20%, rgba(14, 165, 233, 0.14), transparent 65%),
        linear-gradient(180deg, #f8fafc, #eef2ff 45%, #e0f2fe 100%);
}

body.landing-body header.hero {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(12px);
}

body.landing-body header .container {
    align-items: flex-start;
    padding-top: 16px;
    padding-bottom: 16px;
}

body.landing-body .main-nav a {
    color: #1f2937;
}

body.landing-body .main-nav a:hover,
body.landing-body .main-nav a:focus {
    color: var(--brand-strong);
}

body.landing-body .menu-toggle,
body.landing-body .close-nav,
body.landing-body .user-icon {
    color: #1f2937;
}

body.landing-body .menu-toggle:hover,
body.landing-body .menu-toggle:focus-visible {
    background-color: rgba(249, 115, 22, 0.16);
}

body.landing-body #main {
    display: block;
    min-height: 0;
}

#content.landing-content {
    display: block;
    padding: 0;
}


.landing-page {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #1e293b;
    --muted: #475569;
    --brand: #fb923c;
    --brand-strong: #ea580c;
    --accent: #f97316;
    --ok: #16a34a;
    --warn: #f59e0b;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(15, 23, 42, 0.06);
    --radius: 18px;
    position: relative;
    width: 100%;
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 120px;
    background: radial-gradient(900px 620px at 12% 0%, rgba(37, 99, 235, 0.12), transparent 60%),
        radial-gradient(640px 480px at 90% 8%, rgba(14, 165, 233, 0.1), transparent 65%), var(--bg);
}

.landing-page a {
    color: var(--brand);
}

.landing-page .container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.landing-hero {
    position: relative;
    overflow: hidden;
}

.landing-page .hero__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 72px 0 52px;
}
.landing-page .hero__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 560px;
}
.landing-page .hero__content .tag {
    align-self: flex-start;
}
.landing-page .hero__heading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.landing-page .hero h1 {
    font: 800 50px/1.05 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ink);
}

.landing-page .hero__title {
    display: block;
}
.landing-page .hero__byline {
    display: block;
    font-size: clamp(1.125rem, 1.8vw, 1.5rem);
    font-weight: 600;
    color: var(--muted);
    margin-top: 12px;
}
.landing-page .hero__byline a {
    color: inherit;
    text-decoration: none;
}
.landing-page .hero__byline a:hover,
.landing-page .hero__byline a:focus-visible {
    color: var(--brand-strong);
}

.landing-page .hero h1 .serif {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-style: italic;
}

.landing-page .hero__heading .sub {
    margin: 0;
    color: var(--muted);
    font-size: 1.125rem;
}

.landing-page .hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.landing-page .hero__media {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.landing-page .mock-link {
    display: block;
    width: min(100%, 520px);
    text-decoration: none;
}
.landing-page .mock-link:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 6px;
    border-radius: calc(var(--radius) + 4px);
}

.landing-page .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.landing-page .btn:hover,
.landing-page .btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(249, 115, 22, 0.36);
}

.landing-page .btn--ghost {
    background: rgba(249, 115, 22, 0.12);
    color: var(--brand-strong);
    border: 1px solid rgba(249, 115, 22, 0.26);
    box-shadow: none;
}

.landing-page .btn--ghost:hover,
.landing-page .btn--ghost:focus-visible {
    box-shadow: 0 18px 30px rgba(249, 115, 22, 0.22);
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    background: rgba(249, 115, 22, 0.16);
    color: var(--brand-strong);
}

.landing-page .glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.landing-page .keypoints {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 28px 0 0;
    width: 100%;
}

.landing-page .hero-features {
    margin-top: 32px;
    width: 100%;
}

.landing-page .hero-features h2 {
    margin-top: 0;
}

.landing-page .kp {
    padding: 18px;
}

.landing-page .kp h4 {
    margin: 6px 0 6px;
    font-size: 1rem;
}

.landing-page .kp p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.landing-page .icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand-strong);
}

.landing-page .landing-main {
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: center;
}

.landing-page .landing-main > .container {
    width: 100%;
}

.landing-page .landing-main > .cta-bar {
    align-self: stretch;
}

.landing-page .panel {
    margin: 0;
    padding: 24px;
}

.landing-page .panel + .panel {
    margin-top: 32px;
}

.landing-page .panel h2 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0.4rem 0 1rem;
    letter-spacing: -0.02em;
}

.landing-page .lead {
    color: var(--muted);
}

.landing-page .split {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
}

.landing-page .glass-card {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    box-shadow: var(--shadow);
}

.landing-page .feature-grid {
    display: grid;
    gap: clamp(20px, 3vw, 28px);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 16px;
}

.landing-page .feature-grid h3 {
    margin: 0.2rem 0 0.4rem;
}

.landing-page .feature-grid p,
.landing-page .audiences p,
.landing-page .audiences li,
.landing-page .split li {
    color: var(--muted);
}

.landing-page .audiences {
    display: grid;
    gap: clamp(20px, 3vw, 28px);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.landing-page .audiences h3 {
    margin: 0.2rem 0 0.4rem;
}

.landing-page .mock {
    width: 100%;
    border-radius: 16px;
    background: radial-gradient(260px 220px at 20% 60%, rgba(56, 189, 248, 0.18), transparent 60%),
        radial-gradient(260px 220px at 80% 30%, rgba(251, 191, 36, 0.18), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    overflow: hidden;
}

.landing-page .mock__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.landing-page .mock::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 39px, rgba(37, 99, 235, 0.08) 39px 40px),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(14, 165, 233, 0.08) 39px 40px);
    mix-blend-mode: screen;
    opacity: 0.3;
    pointer-events: none;
}

.landing-page .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

@media (min-width: 960px) {
    .landing-page .hero__inner {
        flex-direction: column;
        align-items: center;
        gap: 56px;
    }

    .landing-page .hero__content {
        flex: 1 1 0;
    }

    .landing-page .hero__media {
        flex: 1 1 0;
        justify-content: flex-end;
    }

    .landing-page .mock-link {
        width: 100%;
        max-width: 540px;
    }
}

.landing-page ul {
    padding-left: 1.2rem;
}

.landing-page .cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.landing-page .cta-bar {
    position: sticky;
    bottom: 12px;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 0 12px;
    pointer-events: none;
}

.landing-page .cta-bar .inner {
    pointer-events: auto;
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
}

.landing-page .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    margin: 36px 0;
}

@media (max-width: 900px) {
    .landing-page .split {
        grid-template-columns: 1fr;
    }

    body.landing-body header .container {
        align-items: center;
    }
}

@media (max-width: 640px) {
    .landing-page .hero h1 {
        font-size: 42px;
        line-height: 1.1;
    }

    .landing-page .hero__inner {
        padding: 56px 0 40px;
    }
}

.downloads {
    background: var(--bg-secondary);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    padding: 32px;
    margin-bottom: 32px;
}

.downloads h2 {
    margin-top: 0;
    font-size: 28px;
    line-height: 1.2;
}

.downloads-admin-card {
    margin-bottom: 24px;
    padding: 24px;
    background: #f4f6fb;
    border: 1px solid #d9e2ef;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.downloads-admin-card__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.downloads-admin-card__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px 24px;
    margin: 0;
}

.downloads-admin-card__metrics dt {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.downloads-admin-card__metrics dd {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
}

.downloads-summary {
    margin: 16px 0 0;
    color: var(--text-secondary);
}

.downloads-browse-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.downloads-browse-link:hover,
.downloads-browse-link:focus {
    text-decoration: underline;
}

.downloads-table-wrapper {
    margin-top: 24px;
    overflow-x: auto;
}

.downloads-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    background: var(--bg-secondary);
}

.downloads-table th,
.downloads-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface-border);
    text-align: left;
}

.downloads-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

.downloads-preview {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.downloads-preview-placeholder {
    display: inline-block;
    width: 96px;
    height: 64px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.2);
}

.downloads-title-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}

.downloads-title-link:hover,
.downloads-title-link:focus {
    text-decoration: underline;
}

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

.downloads-action-button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.downloads-action-button:hover,
.downloads-action-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}

.downloads-action-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.downloads-action-link:hover,
.downloads-action-link:focus {
    text-decoration: underline;
}

.downloads-pagination {
    margin-top: 24px;
}

.downloads-pagination ul {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.downloads-pagination a,
.downloads-pagination .current {
    display: inline-block;
    min-width: 36px;
    padding: 8px 12px;
    text-align: center;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.downloads-pagination .current {
    background: var(--accent);
    color: #fff;
}

.downloads-pagination a:hover,
.downloads-pagination a:focus {
    background: rgba(249, 115, 22, 0.2);
}

@media (max-width: 720px) {
    .downloads {
        padding: 24px;
    }

    .downloads-table,
    .downloads-table thead,
    .downloads-table tbody,
    .downloads-table th,
    .downloads-table td,
    .downloads-table tr {
        display: block;
        width: 100%;
    }

    .downloads-table thead {
        display: none;
    }

    .downloads-table tr {
        margin-bottom: 16px;
        border: 1px solid var(--surface-border);
        border-radius: 12px;
        padding: 16px;
        background: var(--bg-secondary);
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .downloads-table td {
        border: none;
        padding: 8px 0;
    }

    .downloads-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-secondary);
        margin-bottom: 4px;
    }

    .downloads-actions {
        justify-content: flex-start;
    }
}

.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: var(--bg-secondary);
    border-top: 1px solid var(--surface-border);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.1);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    padding: 20px 24px;
}

.cookie-consent.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-consent__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

.cookie-consent__message {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.cookie-consent__message a {
    color: var(--accent);
    font-weight: 600;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cookie-consent__button {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent__button--accept {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.2);
}

.cookie-consent__button--accept:hover,
.cookie-consent__button--accept:focus-visible {
    background: var(--brand-strong);
}

.cookie-consent__button--reject {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.cookie-consent__button--reject:hover,
.cookie-consent__button--reject:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.cookie-consent__feedback {
    margin: 16px auto 0;
    max-width: 960px;
    font-size: 14px;
    color: var(--brand-strong);
    display: none;
}

.cookie-consent__feedback.is-visible {
    display: block;
}

@media (min-width: 640px) {
    .cookie-consent__content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cookie-consent__actions {
        flex-shrink: 0;
    }
}

/* Plant Scheduler – scoped utility tokens */
.scheduler-page {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.scheduler-page a {
    color: inherit;
    text-decoration: none;
}

.scheduler-page button,
.scheduler-page a.button-like {
    font: inherit;
    cursor: pointer;
}

.scheduler-page .scheduler-hero {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(59, 130, 246, 0.08));
    border-radius: calc(var(--surface-radius) + 6px);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(14px);
}

.scheduler-page .scheduler-hero > .max-w-7xl {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .scheduler-page .scheduler-hero > .max-w-7xl {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.scheduler-page .scheduler-hero .flex {
    gap: 16px;
}

.scheduler-page .scheduler-hero h1 {
    margin: 0 0 4px 0;
    font-size: 1.75rem;
}

.scheduler-page .scheduler-hero form {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduler-page .scheduler-hero select,
.scheduler-page .scheduler-hero button,
.scheduler-page .scheduler-hero input,
.scheduler-page .scheduler-hero a {
    font: inherit;
}

.scheduler-page .scheduler-hero select {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
}

.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col {
    gap: 12px;
}

.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col a,
.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    background: rgba(255, 255, 255, 0.65);
    color: var(--text-secondary);
}

.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col a:hover,
.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col a:focus-visible,
.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col button:hover,
.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    color: var(--text-primary);
    outline: none;
}

.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col .bg-green-600 {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.92), rgba(16, 185, 129, 0.88));
    color: #fff;
    border-color: rgba(16, 185, 129, 0.65);
}

.scheduler-page .scheduler-hero > .max-w-7xl > .flex.flex-col .bg-neutral-900 {
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    border-color: rgba(15, 23, 42, 0.85);
}

.scheduler-page .scheduler-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.scheduler-page .scheduler-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    grid-column: span 12;
}

@media (min-width: 1024px) {
    .scheduler-page .scheduler-column--left {
        grid-column: span 3;
    }

    .scheduler-page .scheduler-column--main {
        grid-column: span 6;
    }

    .scheduler-page .scheduler-column--right {
        grid-column: span 3;
    }
}

.scheduler-page .bg-white {
    background: rgba(255, 255, 255, 0.92);
}

.scheduler-page .shadow-sm {
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.scheduler-page .rounded-2xl {
    border-radius: 22px;
}

.scheduler-page .rounded-xl {
    border-radius: 18px;
}

.scheduler-page .rounded-lg {
    border-radius: 14px;
}

.scheduler-page .rounded {
    border-radius: 10px;
}

.scheduler-page .rounded-full {
    border-radius: 9999px;
}

.scheduler-page .border {
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.scheduler-page .border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.scheduler-page .border-neutral-200 {
    border-color: rgba(148, 163, 184, 0.28);
}

.scheduler-page .border-neutral-300 {
    border-color: rgba(100, 116, 139, 0.35);
}

.scheduler-page .border-yellow-200 {
    border-color: #fde68a;
}

.scheduler-page .border-blue-200 {
    border-color: #bfdbfe;
}

.scheduler-page .border-amber-200 {
    border-color: #fcd34d;
}

.scheduler-page .border-green-200 {
    border-color: #bbf7d0;
}

.scheduler-page .border-red-200 {
    border-color: #fecaca;
}

.scheduler-page .border-emerald-200 {
    border-color: #a7f3d0;
}

.scheduler-page .divide-y > * + * {
    border-top: 1px solid rgba(226, 232, 240, 0.75);
}

.scheduler-page .divide-neutral-100 > * + * {
    border-top-color: rgba(226, 232, 240, 0.75);
}

.scheduler-page .bg-neutral-50 {
    background: rgba(248, 250, 252, 0.92);
}

.scheduler-page .bg-neutral-100 {
    background: rgba(241, 245, 249, 0.92);
}

.scheduler-page .scheduler-hero.bg-neutral-50 {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(59, 130, 246, 0.08));
}

.scheduler-page .bg-neutral-900 {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.scheduler-page .bg-green-600\/80 {
    background: rgba(22, 163, 74, 0.85);
}

.scheduler-page .bg-green-600 {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.scheduler-page .bg-yellow-100,
.scheduler-page .bg-amber-100 {
    background: #fef3c7;
}

.scheduler-page .bg-blue-100 {
    background: #dbeafe;
}

.scheduler-page .bg-amber-500 {
    background: #f59e0b;
}

.scheduler-page .bg-rose-500 {
    background: #f43f5e;
}

.scheduler-page .bg-neutral-400 {
    background: #94a3b8;
}

.scheduler-page .bg-neutral-800 {
    background: #1f2937;
}

.scheduler-page .bg-neutral-100,
.scheduler-page .bg-neutral-50,
.scheduler-page .bg-white {
    color: inherit;
}

.scheduler-page .bg-green-100 {
    background: #dcfce7;
}

.scheduler-page .bg-red-100 {
    background: #fee2e2;
}

.scheduler-page .bg-emerald-100 {
    background: #d1fae5;
}

.scheduler-page .text-white {
    color: #fff;
}

.scheduler-page .text-neutral-900 {
    color: #0f172a;
}

.scheduler-page .text-neutral-800 {
    color: #1e293b;
}

.scheduler-page .text-neutral-700 {
    color: #334155;
}

.scheduler-page .text-neutral-600 {
    color: #475569;
}

.scheduler-page .text-neutral-500 {
    color: #64748b;
}

.scheduler-page .text-neutral-400 {
    color: #94a3b8;
}

.scheduler-page .text-green-600 {
    color: #16a34a;
}

.scheduler-page .text-amber-700 {
    color: #b45309;
}

.scheduler-page .text-emerald-700 {
    color: #047857;
}

.scheduler-page .text-red-700 {
    color: #b91c1c;
}

.scheduler-page .text-xs {
    font-size: 0.75rem;
}

.scheduler-page .text-sm {
    font-size: 0.875rem;
}

.scheduler-page .text-2xl {
    font-size: 1.5rem;
}

.scheduler-page .text-\[11px\] {
    font-size: 0.6875rem;
}

.scheduler-page .font-medium {
    font-weight: 500;
}

.scheduler-page .font-semibold {
    font-weight: 600;
}

.scheduler-page .uppercase {
    text-transform: uppercase;
}

.scheduler-page .tracking-wide {
    letter-spacing: 0.08em;
}

.scheduler-page .flex {
    display: flex;
}

.scheduler-page .inline-flex {
    display: inline-flex;
}

.scheduler-page .flex-col {
    flex-direction: column;
}

.scheduler-page .items-center {
    align-items: center;
}

.scheduler-page .items-start {
    align-items: flex-start;
}

.scheduler-page .justify-between {
    justify-content: space-between;
}

.scheduler-page .justify-center {
    justify-content: center;
}

.scheduler-page .flex-1 {
    flex: 1 1 0;
}

.scheduler-page .ml-auto {
    margin-left: auto;
}

.scheduler-page .ml-2 {
    margin-left: 0.5rem;
}

.scheduler-page .mt-0\.5 {
    margin-top: 0.125rem;
}

.scheduler-page .mt-1 {
    margin-top: 0.25rem;
}

.scheduler-page .mt-2 {
    margin-top: 0.5rem;
}

.scheduler-page .mt-3 {
    margin-top: 0.75rem;
}

.scheduler-page .mb-2 {
    margin-bottom: 0.5rem;
}

.scheduler-page .mb-3 {
    margin-bottom: 0.75rem;
}

.scheduler-page .mb-4 {
    margin-bottom: 1rem;
}

.scheduler-page .px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.scheduler-page .py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.scheduler-page .px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.scheduler-page .px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.scheduler-page .py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.scheduler-page .py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.scheduler-page .py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.scheduler-page .py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.scheduler-page .pr-1 {
    padding-right: 0.25rem;
}

.scheduler-page .gap-6 {
    gap: 1.5rem;
}

.scheduler-page .gap-4 {
    gap: 1rem;
}

.scheduler-page .gap-3 {
    gap: 0.75rem;
}

.scheduler-page .gap-2 {
    gap: 0.5rem;
}

.scheduler-page .gap-1 {
    gap: 0.25rem;
}

.scheduler-page .space-y-2 > * + * {
    margin-top: 0.5rem;
}

.scheduler-page .space-y-1 > * + * {
    margin-top: 0.25rem;
}

.scheduler-page .space-y-3 > * + * {
    margin-top: 0.75rem;
}

.scheduler-page .text-neutral-600 span,
.scheduler-page .text-neutral-600 p {
    color: inherit;
}

.scheduler-page .max-w-7xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.scheduler-page .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.scheduler-page .h-14 {
    height: 3.5rem;
}

.scheduler-page .w-14 {
    width: 3.5rem;
}

.scheduler-page .h-8 {
    height: 2rem;
}

.scheduler-page .h-6 {
    height: 1.5rem;
}

.scheduler-page .w-6 {
    width: 1.5rem;
}

.scheduler-page .h-2 {
    height: 0.5rem;
}

.scheduler-page .w-2 {
    width: 0.5rem;
}

.scheduler-page .w-full {
    width: 100%;
}

.scheduler-page .w-64 {
    width: 16rem;
}

.scheduler-page .max-h-64 {
    max-height: 16rem;
}

.scheduler-page .overflow-y-auto {
    overflow-y: auto;
}

.scheduler-page .overflow-x-auto {
    overflow-x: auto;
}

.scheduler-page .overflow-hidden {
    overflow: hidden;
}

.scheduler-page .grid {
    display: grid;
}

.scheduler-page .grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.scheduler-page .grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.scheduler-page .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.scheduler-page .col-span-12 {
    grid-column: span 12;
}

.scheduler-page .aspect-square {
    aspect-ratio: 1 / 1;
}

.scheduler-page .list-disc {
    list-style: disc;
}

.scheduler-page .list-inside {
    padding-left: 1rem;
}

.scheduler-page .hover\:bg-neutral-50:hover {
    background: rgba(248, 250, 252, 0.92);
}

.scheduler-page .uppercase,
.scheduler-page .tracking-wide {
    letter-spacing: 0.08em;
}

.scheduler-page section h2 {
    margin: 0;
    font-size: 1.05rem;
}

.scheduler-page input[type="search"],
.scheduler-page select {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    padding: 0.55rem 0.85rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-primary);
    box-sizing: border-box;
}

.scheduler-page input[type="search"]:focus,
.scheduler-page select:focus {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.scheduler-page button {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 0.45rem 0.85rem;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.scheduler-page button:hover,
.scheduler-page button:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
    outline: none;
}

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

.scheduler-page thead {
    background: rgba(241, 245, 249, 0.6);
}

.scheduler-page th,
.scheduler-page td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.scheduler-page tbody tr:hover {
    background: rgba(248, 250, 252, 0.72);
}

.scheduler-page ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.scheduler-page .space-y-2 li,
.scheduler-page .space-y-3 li {
    border-radius: 18px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.scheduler-page .space-y-2 li:hover,
.scheduler-page .space-y-2 li:focus-within,
.scheduler-page .space-y-3 li:hover,
.scheduler-page .space-y-3 li:focus-within {
    background: rgba(248, 250, 252, 0.75);
    transform: translateY(-1px);
}

.scheduler-page .text-neutral-500 span,
.scheduler-page .text-neutral-500 p,
.scheduler-page .text-neutral-500 small {
    color: inherit;
}

.scheduler-page .inline-flex.gap-1 {
    display: inline-flex;
    align-items: center;
}

.scheduler-page .inline-flex.gap-1 > * + * {
    margin-left: 4px;
}

.scheduler-page .grid-cols-6.gap-1 {
    gap: 4px;
}

.scheduler-page .grid-cols-6.gap-1 > * {
    background: rgba(226, 232, 240, 0.6);
}

@media (min-width: 640px) {
    .scheduler-page .sm\:flex-row {
        flex-direction: row;
    }

    .scheduler-page .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .scheduler-page .lg\:flex-row {
        flex-direction: row;
    }

    .scheduler-page .lg\:items-center {
        align-items: center;
    }

    .scheduler-page .lg\:justify-between {
        justify-content: space-between;
    }

    .scheduler-page .lg\:col-span-3 {
        grid-column: span 3;
    }

    .scheduler-page .lg\:col-span-6 {
        grid-column: span 6;
    }
}

