﻿:root {
    --background: #f6efe8;
    --background-strong: #efe0d2;
    --surface: rgba(255, 250, 245, 0.86);
    --surface-strong: #fffaf6;
    --surface-dark: #30211c;
    --text: #2f211d;
    --muted: #6b5851;
    --accent: #b96749;
    --accent-dark: #8a4834;
    --accent-soft: rgba(185, 103, 73, 0.12);
    --line: rgba(87, 56, 44, 0.14);
    --success: #406b53;
    --danger: #8a3136;
    --shadow: 0 24px 70px rgba(64, 39, 31, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fbf7f3;
    background-image:
        url("../lilnthanos.png"),
        linear-gradient(180deg, #fbf7f3 0%, var(--background) 48%, #efe4da 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: top center, center;
    background-size: 100% auto, cover;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(250, 244, 238, 0.82);
}

.header-shell,
.footer-shell,
.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin: 24px 0 0;
    border-bottom: 2px solid var(--border, #e8ddd6);
}

.admin-tab {
    display: inline-block;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted, #9e7b6a);
    text-decoration: none;
    border-radius: 6px 6px 0 0;
    border: 2px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    transition: color 0.15s, background 0.15s;
}

.admin-tab:hover {
    color: var(--text, #3d2c26);
    background: var(--bg-alt, #f7f1ed);
}

.admin-tab.active {
    color: var(--text, #3d2c26);
    background: var(--surface, #fff);
    border-color: var(--border, #e8ddd6);
    border-bottom-color: var(--surface, #fff);
}

.header-shell {
    padding: 18px 0;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
}

.brand span {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.site-nav a,
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.site-nav a {
    color: var(--muted);
    border: 1px solid transparent;
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--accent-dark);
    border-color: rgba(185, 103, 73, 0.22);
    background: rgba(255, 255, 255, 0.56);
}

.site-nav .admin-link {
    color: var(--accent-dark);
    border-color: rgba(185, 103, 73, 0.18);
    background: rgba(255, 255, 255, 0.68);
}

.page-shell {
    padding: 34px 0 56px;
}

.panel,
.hero,
.grid-card,
.photo-card,
.admin-shell,
.admin-card,
.notice,
.stats-card,
.table-shell {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow);
    border-radius: 28px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 26px;
    padding: 42px;
    overflow: hidden;
}

.hero-copy span,
.section-eyebrow {
    display: inline-block;
    color: var(--accent-dark);
    font-size: 0.78rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-copy h1,
.page-title,
.admin-card h2,
.admin-shell h1 {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 0.98;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 4.9rem);
}

.hero-copy p,
.section-copy,
.grid-card p,
.photo-card p,
.notice p,
.admin-card p,
.field label,
.helper-text,
.table-shell td,
.table-shell th,
.inline-list li {
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.button,
button {
    appearance: none;
    border: none;
    cursor: pointer;
    background: transparent;
}

.button.primary,
button.primary {
    background: var(--accent);
    color: #fffaf6;
}

.button.secondary,
button.secondary {
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(185, 103, 73, 0.18);
}

.button.ghost,
button.ghost {
    color: var(--accent-dark);
    background: rgba(185, 103, 73, 0.08);
}

button:hover,
.button:hover {
    transform: translateY(-1px);
}

.hero-side {
    display: grid;
    gap: 16px;
}

.info-chip,
.grid-card,
.stats-card,
.notice,
.admin-card,
.table-shell {
    padding: 22px;
}

.info-chip {
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 227, 218, 0.78));
    border: 1px solid rgba(185, 103, 73, 0.14);
}

.info-chip strong,
.grid-card strong,
.stats-card strong,
.photo-card h3,
.admin-card h3 {
    display: block;
    margin-bottom: 8px;
    font-size: 1.06rem;
}

.section-heading {
    margin: 34px 0 0;
}

.page-title {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.grid-3,
.stats-grid,
.admin-grid,
.timeline-grid {
    display: grid;
    gap: 22px;
    margin-top: 24px;
}

.grid-2 {
    display: grid;
    gap: 22px;
    margin-top: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3,
.stats-grid,
.admin-grid,
.timeline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-card {
    padding: 16px;
}

.photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
    background: #e9ddd6;
}

.panel {
    padding: 30px;
}

.panel.narrow,
.admin-shell.login {
    width: min(620px, 100%);
    margin: 0 auto;
}

.notice {
    margin-top: 20px;
    background: rgba(64, 107, 83, 0.1);
    border-color: rgba(64, 107, 83, 0.15);
}

.notice.error {
    background: rgba(138, 49, 54, 0.11);
    border-color: rgba(138, 49, 54, 0.18);
}

.field,
.field-grid {
    display: grid;
    gap: 8px;
}

.field {
    margin-bottom: 18px;
}

.field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.check-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
}

.check-option input {
    width: auto;
    margin: 0;
}

.checkbox-field {
    align-content: end;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.button-group.attendance-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 300px;
}

.button-option input:checked + .button-label.btn-yes {
    background: #70a85f;
    border-color: #5a8f4f;
    color: #fff;
}

.button-option input:checked + .button-label.btn-no {
    background: rgba(138, 49, 54, 0.18);
    border-color: rgba(138, 49, 54, 0.4);
    color: var(--danger);
}

.button-group.guests-group {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    max-width: 400px;
}

.button-option {
    position: relative;
}

.button-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.button-option .button-label {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    border: 2px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button-option input:checked + .button-label {
    background: var(--accent);
    color: #fffaf6;
    border-color: var(--accent);
}

.button-option:hover .button-label {
    border-color: var(--accent-soft);
    background: rgba(185, 103, 73, 0.08);
}

.button-option input:checked:hover + .button-label {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.field-label-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 44px;
    gap: 0;
}

.toggle-switch.large {
    height: 52px;
    width: 120px;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.68);
    border: 2px solid var(--line);
    border-radius: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.toggle-switch.large .toggle-slider {
    width: 120px;
    height: 52px;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 2px;
    top: 2px;
    background-color: var(--muted);
    border-radius: 50%;
    transition: left 0.3s ease;
}

.toggle-switch.large .toggle-slider::after {
    width: 44px;
    height: 44px;
    left: 2px;
    top: 2px;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::after {
    left: 32px;
    background-color: #fffaf6;
}

.toggle-switch.large input:checked + .toggle-slider::after {
    left: 70px;
}

.toggle-text-yes,
.toggle-text-no {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.toggle-switch.large .toggle-text-yes,
.toggle-switch.large .toggle-text-no {
    font-size: 0.9rem;
    font-weight: 700;
}

.toggle-text-yes {
    left: 8px;
    color: transparent;
    transition: color 0.3s ease;
}

.toggle-text-no {
    right: 8px;
    color: #8a5a4a;
    transition: color 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider + .toggle-text-yes {
    color: #fffaf6;
}

.toggle-switch input:checked + .toggle-slider + .toggle-text-yes + .toggle-text-no {
    color: transparent;
}

/* Green for Yes selection, light red for No selection */
.toggle-switch input:not(:checked):not([disabled]) + .toggle-slider {
    background-color: rgba(242, 201, 201, 0.6);
    border-color: rgba(138, 49, 54, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #70a85f;
    border-color: #5a8f4f;
}

.toggle-label-yes,
.toggle-label-no {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.toggle-label-yes {
    left: -28px;
    color: var(--muted);
}

.toggle-switch input:checked + .toggle-slider + .toggle-label-yes {
    color: var(--accent);
}

.toggle-label-no {
    right: -20px;
    color: var(--muted);
}

.toggle-switch input:checked + .toggle-slider + .toggle-label-yes + .toggle-label-no {
    color: var(--muted);
}

.menu-select {
    min-height: 140px;
}

.menu-editor-block {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.menu-editor-block:first-of-type {
    padding-top: 0;
    border-top: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-pill.active {
    color: var(--success);
    background: rgba(64, 107, 83, 0.12);
}

.status-pill.inactive {
    color: var(--danger);
    background: rgba(138, 49, 54, 0.12);
}

.inline-form {
    margin: 0;
}

.stats-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-grid-full {
    margin-top: 22px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
    font-weight: 600;
    color: var(--text);
}

input,
textarea,
select {
    width: 100%;
    font: inherit;
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(87, 56, 44, 0.14);
    background: rgba(255, 255, 255, 0.94);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.admin-shell {
    padding: 32px;
}

.admin-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-card small,
.helper-text,
.meta {
    color: var(--muted);
}

.inline-list {
    margin: 14px 0 0;
    padding-left: 18px;
}

.table-shell {
    overflow-x: auto;
}

.table-shell table {
    width: 100%;
    border-collapse: collapse;
}

.table-shell th,
.table-shell td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.timeline-card {
    position: relative;
    padding-left: 26px;
}

.timeline-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.callout {
    margin-top: 24px;
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 251, 248, 0.92), rgba(243, 226, 217, 0.82));
    border: 1px solid rgba(185, 103, 73, 0.16);
}

.site-footer {
    padding: 0 0 24px;
}

.footer-shell {
    justify-content: center;
}

.footer-shell p {
    color: var(--muted);
}

.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

@media (max-width: 1100px) {
    .hero {
        padding: 34px;
    }

    .panel,
    .admin-shell {
        padding: 26px;
    }
}

@media (max-width: 980px) {
    .shell {
        width: min(1160px, calc(100% - 24px));
    }

    .page-shell {
        padding: 24px 0 40px;
    }

    .hero,
    .grid-3,
    .grid-2,
    .stats-grid,
    .timeline-grid,
    .admin-grid,
    .field-grid.two,
    .check-grid,
    .stats-grid-wide {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 20px;
        padding: 28px;
    }

    .hero-copy h1 {
        font-size: clamp(2.1rem, 8vw, 3.2rem);
    }

    .table-shell table {
        min-width: 700px;
    }

    .table-shell-header {
        flex-wrap: wrap;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    .header-shell {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 0;
    }

    .admin-top {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        gap: 2px;
    }

    .brand span {
        display: none;
    }

    .brand strong {
        font-size: 1rem;
        white-space: nowrap;
    }

    .site-nav {
        justify-content: flex-end;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a,
    .site-nav .admin-link {
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .hero,
    .panel,
    .admin-shell,
    .stats-card,
    .grid-card,
    .photo-card,
    .table-shell,
    .notice,
    .info-chip {
        border-radius: 20px;
    }

    .hero,
    .panel,
    .admin-shell,
    .table-shell,
    .grid-card,
    .stats-card,
    .notice,
    .info-chip {
        padding: 18px;
    }

    .hero-actions,
    .inline-actions,
    .inline-actions-compact {
        gap: 10px;
    }

    .button,
    button {
        width: 100%;
        min-height: 44px;
    }

    .inline-actions .button,
    .inline-actions button,
    .hero-actions .button,
    .hero-actions button,
    .inline-actions-compact .button,
    .inline-actions-compact button {
        flex: 1 1 100%;
    }

    input,
    textarea,
    select {
        font-size: 16px;
    }

    .button-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .table-shell table {
        min-width: 620px;
    }

    .upload-preview {
        max-width: 100%;
    }

    .invitation-header-image {
        margin-bottom: 16px;
    }

    .invitation-header-image img {
        max-height: 240px;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(1160px, calc(100% - 16px));
    }

    .header-shell {
        padding: 6px 0;
    }

    .brand strong {
        font-size: 0.92rem;
    }

    .site-nav a,
    .site-nav .admin-link {
        padding: 6px 8px;
        font-size: 0.72rem;
    }

    .hero-copy span,
    .section-eyebrow {
        letter-spacing: 0.2em;
        font-size: 0.72rem;
        margin-bottom: 12px;
    }

    .hero-copy h1,
    .page-title,
    .admin-shell h1,
    .admin-card h2 {
        line-height: 1.06;
    }

    .hero-copy h1 {
        font-size: clamp(1.9rem, 11vw, 2.6rem);
    }

    .panel,
    .admin-shell,
    .hero,
    .table-shell,
    .grid-card,
    .stats-card,
    .photo-card,
    .notice,
    .info-chip {
        border-radius: 16px;
        padding: 14px;
    }

    .table-shell table {
        min-width: 560px;
    }

    .detail-row {
        gap: 10px;
        align-items: flex-start;
    }

    .detail-row .label,
    .detail-row .value {
        font-size: 0.86rem;
    }

    .button-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .button-option .button-label {
        padding: 12px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .field-label-with-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .toggle-switch.large {
        height: 52px;
        width: 120px;
    }
}

/* --- Upload & edit features --- */

.admin-card-full {
    grid-column: 1 / -1;
}

.upload-preview {
    display: block;
    max-width: 220px;
    max-height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
}

input[type="file"] {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.inline-actions-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.inline-actions-compact .button,
.inline-actions-compact button {
    padding: 6px 12px;
    font-size: 0.82rem;
}

button.danger,
.button.danger {
    color: var(--danger);
    border-color: rgba(138, 49, 54, 0.25);
}

button.danger:hover,
.button.danger:hover {
    background: rgba(138, 49, 54, 0.08);
}

.table-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.table-shell-header h2 {
    margin: 0;
}

.invitation-header-image {
    width: 100%;
    margin-bottom: 28px;
    border-radius: 18px;
    overflow: hidden;
}

.invitation-header-image img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
}

.guest-card {
    background: linear-gradient(135deg, rgba(207, 159, 125, 0.12) 0%, rgba(87, 56, 44, 0.08) 100%);
    border: 2px solid rgba(207, 159, 125, 0.2);
}

.guest-details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(87, 56, 44, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.detail-row .label {
    font-weight: 600;
    color: rgba(87, 56, 44, 0.7);
}

.detail-row .value {
    color: var(--text);
    font-weight: 500;
}

.thankyou-panel {
    text-align: center;
}

.thankyou-panel .inline-actions {
    justify-content: center;
    margin-top: 28px;
}

.thankyou-details {
    margin: 28px auto 0;
    max-width: 420px;
    background: rgba(207, 159, 125, 0.08);
    border: 1px solid rgba(207, 159, 125, 0.2);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.gift-guide-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gift-guide-list li {
    padding: 12px 16px 12px 44px;
    background: rgba(207, 159, 125, 0.08);
    border: 1px solid rgba(207, 159, 125, 0.18);
    border-radius: 12px;
    position: relative;
    font-size: 0.97rem;
    line-height: 1.5;
}

.gift-guide-list li::before {
    content: '🎁';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.map-row {
    margin-top: 4px;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent, #57382c);
    text-decoration: none;
    padding: 6px 0;
}

.map-link:hover {
    text-decoration: underline;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

@media (max-width: 760px) {
    .upload-preview {
        max-width: 100%;
    }

    .invitation-header-image {
        margin-bottom: 16px;
    }

    .invitation-header-image img {
        max-height: 240px;
    }

    .inline-actions-compact .button,
    .inline-actions-compact button {
        width: 100%;
        padding: 10px 12px;
    }
}

