/* Amaippalar Matrimony Theme - Crimson, Maroon & Warm Gold Palette */

:root {
    --matrimony-primary: #8b1538;
    --matrimony-primary-hover: #73102d;
    --matrimony-primary-light: #b8294e;
    --matrimony-primary-soft: #fdf4f6;
    --matrimony-dark: #2b0912;
    --matrimony-darker: #1e050c;
    --matrimony-heading: #3b0a18;
    --matrimony-gold: #ffd875;
    --matrimony-gold-soft: #ffe39f;
    --matrimony-gold-dark: #b78114;
    --matrimony-border: #eddbe0;
    --danger: #dc3545;
    --danger-light: rgba(220, 53, 69, 0.12);
    --bs-primary: #8b1538;
    --bs-primary-rgb: 139, 21, 56;
    --bs-link-color: #8b1538;
    --bs-link-hover-color: #6b102b;
}

body {
    background-color: #faf5f6;
    color: #2d1b20;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

/* Global Bootstrap Theme Overrides to match Login Page Palette */
.btn-primary {
    background: linear-gradient(135deg, #8b1538 0%, #b8294e 100%);
    border-color: #8b1538;
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.22);
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #73102d 0%, #9e1f40 100%) !important;
    border-color: #73102d !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(139, 21, 56, 0.32);
}

.btn-outline-primary {
    color: #8b1538;
    border-color: #8b1538;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #8b1538 !important;
    border-color: #8b1538 !important;
    color: #fff !important;
}

.bg-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.text-primary {
    color: #8b1538 !important;
}

.border-primary {
    border-color: #8b1538 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #b8294e;
    box-shadow: 0 0 0 0.2rem rgba(139, 21, 56, 0.15);
}

.form-check-input:checked {
    background-color: #8b1538;
    border-color: #8b1538;
}

.form-check-input:focus {
    border-color: #b8294e;
    box-shadow: 0 0 0 0.2rem rgba(139, 21, 56, 0.18);
}

.card {
    border-color: var(--matrimony-border);
}

.card-header.bg-white {
    border-bottom: 1px solid var(--matrimony-border);
    color: var(--matrimony-heading);
}

.table-light,
.table > thead.table-light > tr > th {
    background-color: #fdf5f7 !important;
    color: #4a1525;
    border-bottom-color: var(--matrimony-border);
}

.modal-header.bg-light {
    background: linear-gradient(135deg, #3b0a18 0%, #6b132b 100%) !important;
    color: #fff8eb;
    border-bottom: 1px solid rgba(255, 216, 117, 0.25);
}

.modal-header.bg-light .modal-title {
    color: #fff8eb;
}

.modal-header.bg-light .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-footer.bg-light {
    background-color: #fdf6f8 !important;
    border-top: 1px solid var(--matrimony-border);
}

/* Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2b0912 0%, #3b0a18 55%, #21060d 100%);
    color: rgba(255, 240, 225, 0.78);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(43, 9, 18, 0.18);
    border-right: 1px solid rgba(255, 216, 117, 0.15);
}

.admin-sidebar a {
    color: rgba(255, 240, 225, 0.78);
    text-decoration: none;
    transition: all 0.18s ease;
}

.admin-sidebar a:hover {
    color: #ffe39f;
    background-color: rgba(255, 216, 117, 0.10);
}

.admin-sidebar a.active {
    color: #fff8eb;
    background: linear-gradient(135deg, #8b1538 0%, #b8294e 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-left: 3px solid #ffd875;
    font-weight: 600;
}

.sidebar-brand {
    padding: 1.25rem 1.15rem;
    font-size: 1.12rem;
    font-weight: 700;
    color: #fff8eb !important;
    border-bottom: 1px solid rgba(255, 216, 117, 0.16);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b1538 0%, #b8294e 100%);
    border: 1px solid rgba(255, 216, 117, 0.4);
    color: #ffd875;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0.85rem 0.65rem;
    margin: 0;
    flex: 1;
}

.sidebar-nav .nav-link {
    padding: 0.68rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.94rem;
}

.sidebar-footer {
    padding: 1.1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 216, 117, 0.16);
}

.badge-matrimony-gold {
    background: rgba(255, 216, 117, 0.18);
    border: 1px solid rgba(255, 216, 117, 0.45);
    color: #ffe39f;
    font-weight: 600;
}

.admin-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-navbar {
    background-color: #ffffff;
    border-bottom: 2px solid var(--matrimony-border);
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(59, 10, 24, 0.04);
}

.admin-navbar h5 {
    color: var(--matrimony-heading);
}

.admin-main {
    flex: 1;
    padding: 1.75rem;
}

/* Welcome Hero Card & Quick Actions (Dashboard) */
.matrimony-welcome-banner {
    background: linear-gradient(135deg, #3b0a18 0%, #8b1538 55%, #b8294e 100%);
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 216, 117, 0.32);
    color: #fff8eb;
    box-shadow: 0 12px 28px rgba(139, 21, 56, 0.22);
}

.quick-action-tile {
    background-color: #fdf9fa;
    border: 1px solid var(--matrimony-border) !important;
    border-radius: 0.65rem !important;
    transition: all 0.18s ease;
}

.quick-action-tile:hover {
    background-color: #fff;
    border-color: #d9a7b4 !important;
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.08);
}

/* Access Denied / Custom Auth Card Helpers */
.card-custom {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 215, 150, 0.35);
}

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #8b1538 0%, #b8294e 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #73102d 0%, #9e1f40 100%);
    color: #fff;
}

.btn-secondary-custom {
    display: inline-flex;
    align-items: center;
    background: #fdf4f6;
    border: 1px solid var(--matrimony-border);
    color: var(--matrimony-heading);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
    background: #f5e4e8;
    color: var(--matrimony-heading);
}

/* Card */
.admin-card {
    background: #fff;
    border: 1px solid var(--matrimony-border);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(59, 10, 24, 0.05);
    margin-bottom: 1.5rem;
}

.admin-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--matrimony-border);
    background-color: #fff;
    color: var(--matrimony-heading);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-body {
    padding: 1.25rem;
}

/* Simple Login Box & Matrimony Auth Theme */
.login-box {
    width: 100%;
    max-width: 420px;
    margin: 4rem auto;
}

.auth-body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #2b0912;
}

.auth-bg-slideshow {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.auth-bg-slide {
    position: absolute;
    inset: -2%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.8s ease-in-out, transform 8s ease-out;
}

.auth-bg-slide.active {
    opacity: 1;
    transform: scale(1);
}

.auth-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(43, 9, 18, 0.80) 0%,
        rgba(88, 18, 35, 0.68) 50%,
        rgba(30, 12, 5, 0.82) 100%
    );
    backdrop-filter: blur(3px);
}

.auth-container {
    position: relative;
    z-index: 2;
}

.login-split-card {
    max-width: 940px;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 150, 0.28);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.45);
    background: rgba(255, 255, 255, 0.97);
}

.login-hero-panel {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 360px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.login-hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(64, 11, 24, 0.55) 0%,
        rgba(74, 12, 28, 0.78) 65%,
        rgba(43, 7, 16, 0.94) 100%
    );
    z-index: 0;
}

.login-hero-content {
    position: relative;
    z-index: 1;
}

.matrimony-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50rem;
    background: rgba(255, 215, 130, 0.18);
    border: 1px solid rgba(255, 215, 130, 0.45);
    color: #ffe39f;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.matrimony-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 248, 235, 0.92);
}

.matrimony-feature-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 215, 130, 0.2);
    border: 1px solid rgba(255, 215, 130, 0.4);
    color: #ffd875;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-form-panel {
    padding: 2.5rem 2.25rem;
    background: #ffffff;
}

.login-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b1538 0%, #b8294e 100%);
    color: #ffe39f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(139, 21, 56, 0.25);
}

.input-icon-group .input-group-text {
    background-color: #fdf8f9;
    border-right: none;
    color: #8b1538;
}

.input-icon-group .form-control {
    border-left: none;
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
}

.input-icon-group .form-control:focus {
    box-shadow: none;
    border-color: #b8294e;
}

.input-icon-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(139, 21, 56, 0.15);
    border-radius: 0.375rem;
}

.input-icon-group:focus-within .input-group-text,
.input-icon-group:focus-within .form-control,
.input-icon-group:focus-within .btn-toggle-pass {
    border-color: #b8294e;
}

.btn-matrimony {
    background: linear-gradient(135deg, #8b1538 0%, #b8294e 100%);
    border: none;
    color: #fff;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(139, 21, 56, 0.28);
    transition: all 0.2s ease;
}

.btn-matrimony:hover,
.btn-matrimony:focus {
    background: linear-gradient(135deg, #73102d 0%, #9e1f40 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(139, 21, 56, 0.36);
}

.demo-login-card {
    background-color: #fdf8f9;
    border: 1px dashed rgba(139, 21, 56, 0.25);
    border-radius: 0.65rem;
    padding: 0.75rem 0.9rem;
}

.demo-cred-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #f0dfe3;
    border-radius: 0.45rem;
    padding: 0.35rem 0.65rem;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: #495057;
    transition: all 0.15s ease;
    cursor: pointer;
}

.demo-cred-btn:hover {
    border-color: #b8294e;
    background-color: #fff5f7;
}

.bg-switcher-dots {
    display: flex;
    gap: 0.45rem;
}

.bg-switcher-dot {
    width: 24px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.bg-switcher-dot.active {
    width: 36px;
    background: #ffd875;
}
