/* 
   DBA Nagpur - Advocate Membership Management System
   Premium Custom Styles
*/

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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary-color: #0f172a;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-color: #e2e8f0;
    --sidebar-width: 210px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-text: #ffffff;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(15, 23, 42, 0.05);
}

.sidebar .brand {
    padding: 1rem 0.85rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .brand h5 {
    color: #ffffff;
    font-weight: 700;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
}

.sidebar .brand small {
    color: rgba(255, 255, 255, 0.65) !important;
    display: block !important;
    font-size: 0.72rem !important;
    line-height: 1.1;
    margin-top: 0.15rem;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 8px;
    margin: 0.15rem 0.5rem;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar .nav-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    padding: 0.65rem 1rem 0.2rem;
    font-weight: 700;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0.75rem 1rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Top Navbar */
.top-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    margin: -0.75rem -1rem 1rem -1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Premium Card Design */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0.85rem;
    font-weight: 600;
}

/* Stats Cards */
.stat-card {
    position: relative;
    padding: 1.5rem;
}

.stat-card .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card.primary .icon-box { background-color: #e0e7ff; color: #4f46e5; }
.stat-card.success .icon-box { background-color: #d1fae5; color: #10b981; }
.stat-card.warning .icon-box { background-color: #fef3c7; color: #d97706; }
.stat-card.danger .icon-box { background-color: #fee2e2; color: #ef4444; }
.stat-card.info .icon-box { background-color: #e0f2fe; color: #0284c7; }

/* Custom Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 550;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.25);
}

/* Auth Pages layout */
/* Auth Pages layout */
.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, rgba(79, 70, 229, 0) 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
    bottom: -150px;
    right: -150px;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(12px);
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3) !important;
}

.auth-card .brand-logo {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-card .input-group {
    transition: all 0.2s ease;
    border-radius: 10px;
}

.auth-card .input-group-text {
    border: 1px solid #cbd5e1;
    border-right: none;
    background-color: #f8fafc;
    color: #64748b;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    padding-left: 14px;
    padding-right: 14px;
}

.auth-card .form-control {
    border: 1px solid #cbd5e1;
    border-left: none;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    font-size: 0.95rem;
    padding: 0.75rem 1rem 0.75rem 0;
    color: #0f172a;
    transition: none;
}

.auth-card .form-control:focus {
    border-color: #cbd5e1;
    box-shadow: none;
}

.auth-card .input-group:focus-within .input-group-text,
.auth-card .input-group:focus-within .form-control {
    border-color: var(--primary-color);
    background-color: #ffffff;
}

.auth-card .input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/* Receipt Print layout */
@media print {
    body {
        background-color: #ffffff;
        color: #000000;
    }
    .sidebar, .top-navbar, .btn, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Form controls customization */
.form-label {
    font-weight: 600;
    color: #334155; /* Dark Slate for high label visibility */
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
}

.form-control, .form-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #94a3b8; /* Darker Slate border for high visibility */
    border-radius: 6px;
    font-size: 0.9rem;
    color: #1e293b;
    background-color: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    color: #0f172a;
}

/* Select2 Custom Styling for High Visibility */
.select2-container--default .select2-selection--single {
    border: 1px solid #94a3b8 !important;
    border-radius: 6px !important;
    height: 34px !important; /* Matches Bootstrap form-control padding */
    padding: 4px 10px !important;
    font-size: 0.9rem !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    line-height: 24px !important;
    padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
    outline: none !important;
}

.select2-dropdown {
    border: 1px solid #94a3b8 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px !important;
    font-size: 0.95rem !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

/* Tables styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.60rem;
}

.table td {
    padding: 0.5rem 0.60rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* Profile / Detail styles */
.profile-img-container {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 1.5rem;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.badge-active { background-color: rgba(16, 185, 129, 0.1); color: var(--success-color); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-inactive { background-color: rgba(100, 116, 139, 0.1); color: var(--text-secondary); border: 1px solid rgba(100, 116, 139, 0.2); }
.badge-suspended { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-color); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-deceased { background-color: rgba(239, 68, 68, 0.1); color: var(--danger-color); border: 1px solid rgba(239, 68, 68, 0.2); }

/* Compact mode styles */
.table-compact-mode th, 
.table-compact-mode td {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.82rem !important;
}

.table-compact-mode th:nth-child(3), 
.table-compact-mode td:nth-child(3),
.table-compact-mode th:nth-child(5), 
.table-compact-mode td:nth-child(5) {
    display: none !important;
}

/* Global Overrides for Compact Form Single-View Layout */
.card-body {
    padding: 1rem !important;
}

.mb-4 {
    margin-bottom: 0.75rem !important;
}

.row.g-3 {
    --bs-gutter-y: 0.5rem !important;
    --bs-gutter-x: 0.75rem !important;
}

.form-check-inline {
    padding: 0.35rem 0.75rem !important;
}
