@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    --accent-hover: linear-gradient(135deg, #e11d48 0%, #f97316 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    
    --bg-base: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: rgba(226, 232, 240, 0.8);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 40px -5px rgba(99, 102, 241, 0.15);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,0.03) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, hsla(225,39%,30%,0.03) 0, transparent 50%), 
                      radial-gradient(at 100% 0%, hsla(339,49%,30%,0.03) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Styling - Glassmorphism */
@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        height: 100vh;
        overflow-y: auto;
    }
}

.sidebar {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-light);
    min-height: 100vh;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-muted);
    padding: 12px 20px;
    border-radius: 12px;
    margin: 6px 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover {
    color: var(--text-main);
    background: rgba(99, 102, 241, 0.08);
    transform: translateX(4px);
}

.sidebar .nav-link:hover i {
    transform: scale(1.1);
    color: #6366f1;
}

.sidebar .nav-link.active {
    background: var(--primary-gradient);
    color: #ffffff !important;
    box-shadow: var(--shadow-glow);
    font-weight: 600;
}

.sidebar .nav-link.active i {
    color: #ffffff;
}

/* Card Styling - Premium Look */
.card, .card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    overflow: hidden;
}

.card-premium:hover, .transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Header Component */
.header-gradient {
    background: var(--primary-gradient);
    color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.header-gradient::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

/* Custom Forms - Modern */
.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    background-color: #f8fafc;
    color: var(--text-main);
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control:focus, .form-select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    background-color: #ffffff;
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Buttons - Micro Animations & Gradients */
.btn {
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-premium {
    background: var(--primary-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

.btn-premium-accent {
    background: var(--accent-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.btn-premium-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(244, 63, 94, 0.4);
    color: #ffffff;
}

/* Custom Table - Clean & Airy */
.table-responsive {
    border-radius: 16px;
}

.table {
    margin-bottom: 0;
}

.table-premium {
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: -10px;
}

.table-premium th {
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    padding: 16px 20px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table-premium td {
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 18px 20px;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.table-premium td:first-child {
    border-left: 1px solid var(--border-light);
    border-radius: 16px 0 0 16px;
}

.table-premium td:last-child {
    border-right: 1px solid var(--border-light);
    border-radius: 0 16px 16px 0;
}

.table-premium tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-premium tr:hover td {
    background: #f1f5f9;
}

.table-premium tr:hover {
    transform: scale(1.005);
    box-shadow: var(--shadow-md);
    z-index: 10;
    position: relative;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Lists and Items */
.birth-item, .anniv-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.birth-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

.anniv-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gradient);
}

.birth-item:hover, .anniv-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

/* Stat Icons */
.rounded-circle.p-3 {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism Overlays */
.glass-overlay {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
}

/* Loader Animation */
.spinner-border {
    border-width: 3px;
    border-right-color: transparent;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1040;
        width: 280px;
        min-height: auto;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px);
        border-right: 1px solid var(--border-light);
        display: block !important;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    .sidebar.show {
        visibility: visible;
        transform: translateX(0);
    }
    .sidebar.collapsing {
        visibility: visible;
        display: block !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .card-premium {
        border-radius: 16px;
    }
}

/* SweetAlert customization */
div:where(.swal2-container) div:where(.swal2-popup) {
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm {
    background: var(--primary-gradient);
    border-radius: 10px;
}
