/* ========================================
   Vows & Values - Indian Matrimonial Design System
   Inspired by Magic Patterns + Indian Luxury Aesthetic
   ======================================== */

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

:root {
    /* Maroon - Sindoor Red (Primary) */
    --maroon: #B94545;
    --maroon-dark: #8B2E2E;
    --maroon-light: #D4706A;
    --maroon-glow: rgba(185, 69, 69, 0.5);
    --maroon-bg: #F8EAEA;

    /* Gold - Haldi (Secondary) */
    --gold: #C9A84C;
    --gold-dark: #A88B3A;
    --gold-light: #D4B96A;
    --gold-bg: #FDF8ED;

    /* Saffron */
    --saffron: #E8A838;
    --saffron-light: #F0C060;

    /* Warm backgrounds */
    --cream: #FFFAF5;
    --cream-dark: #F5EDE4;
    --bg-card: #FFFFFF;
    --bg-muted: #FAF6F1;

    /* Text */
    --dark-brown: #2D1810;
    --body-brown: #5C4033;
    --text: #2D2D2D;
    --text-light: #6B6B6B;
    --text-muted: #999999;
    --text-white: #FFFFFF;

    /* Borders */
    --border: #E8E0D8;
    --border-light: #F0EBE5;

    /* Status */
    --success: #2D8B4E;
    --success-bg: #E8F5E9;
    --error: #C0392B;
    --error-bg: #FDEDEB;
    --info: #3B6DB5;
    --info-bg: #EBF5FB;
    --warning: #D4A017;
    --warning-bg: #FFF3E0;

    /* Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 15px rgba(185, 69, 69, 0.4);

    /* Fonts */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    --container: 1200px;
    --header-height: 76px;
    --transition: 0.3s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--maroon-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-brown);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
.section-title { text-align: center; margin-bottom: 0.75rem; }
.section-subtitle {
    text-align: center;
    color: var(--body-brown);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
}

/* ========================================
   Buttons - Rounded Pill Style
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
}
.btn-primary {
    background: var(--maroon);
    color: var(--text-white);
    border-color: var(--maroon);
    box-shadow: 0 4px 14px rgba(185, 69, 69, 0.25);
}
.btn-primary:hover {
    background: var(--maroon-dark);
    border-color: var(--maroon-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(185, 69, 69, 0.35);
}
.btn-secondary {
    background: var(--gold);
    color: var(--text-white);
    border-color: var(--gold);
}
.btn-secondary:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--text-white);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--maroon);
    border-color: var(--maroon);
}
.btn-outline:hover { background: var(--maroon); color: var(--text-white); transform: translateY(-2px); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
    border-radius: var(--radius);
}
.btn-ghost:hover { border-color: var(--text); background: var(--bg-muted); }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   Forms - Warm Indian Styling
   ======================================== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text);
    margin-left: 4px;
}
.form-label .required { color: var(--error); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    font-size: 0.95rem;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(185, 69, 69, 0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input.error, .form-select.error, .form-textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
.form-error { color: var(--error); font-size: 0.82rem; margin-top: 4px; margin-left: 4px; }
.form-help { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='%236B6B6B' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--maroon); }

/* ========================================
   Cards - With Subtle Gold Accents
   ======================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border-light);
}
.card-gold { border-top: 3px solid var(--gold); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 1.1rem; font-weight: 600; font-family: var(--font-display); }

/* ========================================
   Alerts
   ======================================== */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(45,139,78,0.2); }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(192,57,43,0.2); }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(59,109,181,0.2); }
.alert-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: inherit; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

/* ========================================
   Header / Navbar - Glassmorphic
   ======================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(255, 250, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}
.logo { text-decoration: none; }
.logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--maroon);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.logo-text span { color: var(--gold); font-size: 1.8rem; font-style: italic; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-link {
    color: var(--body-brown);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-link:hover { color: var(--maroon); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: var(--transition); border-radius: 2px; }
.nav-logout-form { display: inline; }

/* ========================================
   Footer - Dark Rich Brown
   ======================================== */
.site-footer {
    background: #1A0F0A;
    color: var(--text-white);
    padding: 5rem 0 2rem;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(201,168,76,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; position: relative; z-index: 1; }
.footer-brand .logo-text { color: white; font-size: 1.4rem; }
.footer-brand .logo-text span { color: var(--gold); }
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 1rem; font-size: 0.9rem; line-height: 1.7; }
.footer-links h4 { font-family: var(--font); font-size: 0.9rem; margin-bottom: 1rem; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.footer-links a, .footer-links p { display: block; color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 0.6rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    position: relative;
    z-index: 1;
}

/* Main content offset */
.main-content { padding-top: var(--header-height); }

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}
.badge-success { background: rgba(45,139,78,0.1); color: var(--success); border-color: rgba(45,139,78,0.2); }
.badge-error { background: rgba(192,57,43,0.1); color: var(--error); border-color: rgba(192,57,43,0.2); }
.badge-info { background: rgba(59,109,181,0.1); color: var(--info); border-color: rgba(59,109,181,0.2); }
.badge-warning { background: rgba(212,160,23,0.1); color: var(--warning); border-color: rgba(212,160,23,0.2); }

/* ========================================
   Tables
   ======================================== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
th { font-weight: 600; color: var(--text-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(250,246,241,0.5); }
tr:hover td { background: var(--bg-muted); }

/* ========================================
   Toast
   ======================================== */
.toast-container { position: fixed; top: 90px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    color: white;
    font-size: 0.9rem;
    min-width: 280px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.toast-info { background: var(--info); }

/* ========================================
   Decorative: Rangoli Divider
   ======================================== */
.rangoli-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    opacity: 0.6;
}
.rangoli-divider::before,
.rangoli-divider::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--gold));
}
.rangoli-divider::after {
    background: linear-gradient(90deg, var(--gold), var(--gold), transparent);
}
.rangoli-divider svg { margin: 0 16px; color: var(--gold); }

/* Mandala Background */
.mandala-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.mandala-bg svg {
    position: absolute;
    opacity: 0.03;
}
.mandala-bg .mandala-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px;
}
.mandala-bg .mandala-corner-tr {
    top: -160px; right: -160px;
    width: 500px; height: 500px;
}
.mandala-bg .mandala-corner-bl {
    bottom: -200px; left: -200px;
    width: 600px; height: 600px;
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 2rem; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    color: var(--text);
    transition: all var(--transition);
}
.pagination a:hover { background: var(--maroon); color: white; border-color: var(--maroon); }
.pagination .active { background: var(--maroon); color: white; border-color: var(--maroon); }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--body-brown); margin-bottom: 1.5rem; }

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .container { padding: 0 16px; }
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
    }
    .nav-menu.open { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .btn-lg { padding: 14px 28px; font-size: 1rem; }
    table { font-size: 0.85rem; }
    th, td { padding: 10px 12px; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }
    .card { padding: 16px; }
    .btn { padding: 10px 20px; }
}
