/* ==========================================================================
   WEDDING ADMIN PANEL STYLES — LUXURY BLACK & GOLD
   ========================================================================== */

:root {
    --bg-dark: #0a0a0a;
    --bg-surface: #141414;
    --bg-card: rgba(22, 22, 22, 0.9);
    --bg-input: #1c1c1c;
    --gold-primary: #D4AF37;
    --gold-light: #FDF5A6;
    --gold-bright: #FFE57F;
    --gold-dark: #8C6219;
    --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
    --gold-border: rgba(212, 175, 55, 0.35);
    --gold-border-glow: rgba(212, 175, 55, 0.7);
    --gold-glow: 0 0 20px rgba(212, 175, 55, 0.2);
    --text-white: #f5f5f5;
    --text-muted: #999999;
    --danger: #e74c3c;
    --success: #2ecc71;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, sans-serif;
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.5;
    position: relative;
}

/* Background Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* Toast */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: #1e1e1e;
    border: 1px solid var(--gold-primary);
    border-radius: 8px;
    color: var(--gold-bright);
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), var(--gold-glow);
    z-index: 9999;
    transform: translateY(-50px);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   AUTH OVERLAY
   ========================================================================== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 16px;
    padding: 40px 30px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--gold-glow);
    position: relative;
    z-index: 2;
}

.auth-monogram {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-style: italic;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 5px;
}

.auth-footer-hint {
    margin-top: 20px;
    font-size: 0.75rem;
    color: #666;
}

.auth-footer-hint code {
    color: var(--gold-primary);
    background: #111;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   LAYOUT & HEADER
   ========================================================================== */
.admin-layout {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-monogram {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-style: italic;
    color: var(--gold-bright);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--gold-light);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   TABS NAVIGATION
   ========================================================================== */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-surface);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-white);
    border-color: var(--gold-primary);
}

.tab-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARDS & FORMS
   ========================================================================== */
.pane-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding-bottom: 12px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-light);
    font-weight: 500;
}

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

.admin-input, .admin-select {
    width: 100%;
    padding: 11px 15px;
    background: var(--bg-input);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    color: var(--text-white);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.admin-input:focus, .admin-select:focus {
    border-color: var(--gold-bright);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
    background: #222;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Buttons */
.admin-btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--gold-gradient);
    color: #0d0d0d;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.admin-btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    filter: brightness(1.1);
}

.admin-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    background: transparent;
    border: 1px solid var(--gold-primary);
    border-radius: 8px;
    color: var(--gold-light);
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.admin-btn-outline:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
}

.admin-btn-danger {
    padding: 9px 18px;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: #ff7675;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

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

/* ==========================================================================
   TAB 1: LIVE INVITATION PREVIEW & SHARING
   ========================================================================== */
.invitation-preview-box {
    background: linear-gradient(135deg, #1c1810 0%, #111111 100%);
    border: 1px solid var(--gold-border-glow);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.15);
}

.preview-badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.15);
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.preview-guest-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text-white);
    margin-bottom: 12px;
}

.preview-table-box {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--gold-primary);
    border-radius: 10px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.preview-table-box .table-icon {
    font-size: 1.4rem;
}

.preview-table-box .table-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.preview-venue {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-muted);
}

.url-copy-wrapper {
    display: flex;
    gap: 8px;
}

.url-input {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--gold-bright);
    background: #111;
}

.copy-btn {
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 0.85rem;
}

.share-actions-group {
    margin-top: 15px;
}

.share-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.tg-share {
    background: #229ED9;
    color: #fff;
}

.tg-share:hover {
    background: #1c88bd;
    transform: translateY(-2px);
}

.wa-share {
    background: #25D366;
    color: #fff;
}

.wa-share:hover {
    background: #1da851;
    transform: translateY(-2px);
}

/* ==========================================================================
   TAB 2: TABLES LIST
   ========================================================================== */
.pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-heading {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--gold-light);
}

.section-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge-count {
    color: var(--gold-bright);
    font-weight: 700;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.table-card-item {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.table-card-item:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), var(--gold-glow);
}

.table-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.table-badge-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.table-badge-cap {
    font-size: 0.75rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
    color: var(--gold-light);
}

.table-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.table-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.table-card-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding-top: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* ==========================================================================
   TAB 3: GUESTS TABLE
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
}

.guests-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.guests-table th, .guests-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.guests-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-light);
    background: rgba(15, 15, 15, 0.5);
}

.guests-table tr:hover {
    background: rgba(212, 175, 55, 0.04);
}

.table-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-bright);
    font-weight: 600;
    font-size: 0.8rem;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 14px;
    padding: 25px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), var(--gold-glow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding-bottom: 10px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold-light);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.max-w-700 {
    max-width: 700px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 850px) {
    .pane-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

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