/* Elegant Theme - Sophisticated Gold & Navy */
:root {
    /* Primary Colors */
    --primary-color: #1e40af;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-dark: #1e3a8a;
    
    /* Secondary Colors */
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --secondary-light: #f3f4f6;
    --secondary-dark: #374151;
    
    /* Accent Colors */
    --accent-color: #d97706;
    --accent-hover: #b45309;
    --accent-light: #fef3c7;
    --accent-dark: #92400e;
    
    /* Success Colors */
    --success-color: #059669;
    --success-hover: #047857;
    --success-light: #d1fae5;
    --success-dark: #064e3b;
    
    /* Warning Colors */
    --warning-color: #d97706;
    --warning-hover: #b45309;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    
    /* Danger Colors */
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    
    /* Info Colors */
    --info-color: #0891b2;
    --info-hover: #0e7490;
    --info-light: #cffafe;
    --info-dark: #164e63;
    
    /* Neutral Colors */
    --light-color: #fafafa;
    --dark-color: #1f2937;
    --white: #ffffff;
    --black: #000000;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-dark: #1f2937;
    --bg-light: #f8fafc;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-light: #ffffff;
    --text-dark: #111827;
    
    /* Border Colors */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --border-dark: #d1d5db;
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    --gradient-secondary: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    --gradient-accent: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-info: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

/* Elegant Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

/* Elegant Card Styling */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--text-light);
    border: none;
    border-radius: 16px 16px 0 0;
    font-weight: 600;
    padding: 1.5rem 2rem;
    position: relative;
}

/* Fix text visibility in elegant theme card headers */
.card-header h5,
.card-header h6,
.card-header .h5,
.card-header .h6,
.card-header .fw-bold,
.card-header .mb-3,
.card-header .m-0,
.card-header .font-weight-bold,
.card-header .text-primary {
    color: var(--text-light) !important;
    font-weight: 600 !important;
}

/* Ensure all text in card headers is visible */
.card-header * {
    color: var(--text-light) !important;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-accent);
}

.card-body {
    padding: 2rem;
    background: var(--bg-primary);
}

/* Elegant Button Styling */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.875rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--text-light);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--text-light);
}

.btn-warning {
    background: var(--gradient-warning);
    color: var(--text-dark);
}

.btn-danger {
    background: var(--gradient-danger);
    color: var(--text-light);
}

.btn-info {
    background: var(--gradient-info);
    color: var(--text-light);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--text-light);
}

/* Elegant Navigation */
.navbar {
    background: var(--bg-primary);
    border: none;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1030;
    position: relative;
}

/* Fix navbar brand text visibility */
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Ensure navbar doesn't get hidden behind sidebar */
.navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Responsive navbar brand for elegant theme */
@media (max-width: 1400px) {
    .navbar-brand {
        font-size: 1.1rem;
        max-width: 350px;
    }
}

@media (max-width: 1200px) {
    .navbar-brand {
        font-size: 1rem;
        max-width: 300px;
    }
}

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 0.95rem;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 0.9rem;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 0.85rem;
        max-width: 150px;
    }
}

/* Admin navbar specific styling */
.navbar-dark .navbar-brand {
    color: var(--text-light) !important;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.navbar-dark .navbar-brand:hover {
    color: var(--text-light) !important;
    opacity: 0.8;
}

/* Public navbar brand fixes for elegant theme */
.navbar-light .navbar-brand {
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    transition: all 0.3s ease;
}

.navbar-light .navbar-brand:hover {
    color: var(--primary-color) !important;
    opacity: 0.8;
}

/* Responsive navbar brand for public navbar in elegant theme */
@media (max-width: 1200px) {
    .navbar-light .navbar-brand {
        max-width: 250px;
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .navbar-light .navbar-brand {
        max-width: 200px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar-light .navbar-brand {
        max-width: 150px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .navbar-light .navbar-brand {
        max-width: 120px;
        font-size: 0.85rem;
    }
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 0 0.25rem;
    padding: 0.75rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* Elegant Sidebar */
.sidebar {
    background: var(--bg-light);
    border: none;
    box-shadow: var(--shadow);
    border-right: 1px solid var(--border-light);
}

.sidebar .nav-link {
    color: var(--text-secondary) !important;
    border-radius: 10px;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
    padding: 0.875rem 1rem !important;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
    transform: translateX(6px);
}

.sidebar .nav-link.active {
    color: var(--primary-color) !important;
    background: var(--primary-light);
    border-left: 4px solid var(--accent-color);
    transform: translateX(6px);
    box-shadow: var(--shadow);
}

/* Elegant Form Styling */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Elegant Table Styling */
.table {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-primary);
}

.table thead th {
    background: var(--gradient-primary);
    color: var(--text-light);
    border: none;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.table tbody td {
    border: none;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
}

.table tbody tr:hover {
    background: var(--primary-light);
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Elegant Badge Styling */
.badge {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.badge.bg-success {
    background: var(--gradient-success) !important;
}

.badge.bg-warning {
    background: var(--gradient-warning) !important;
    color: var(--text-dark) !important;
}

.badge.bg-danger {
    background: var(--gradient-danger) !important;
}

.badge.bg-info {
    background: var(--gradient-info) !important;
    color: var(--text-dark) !important;
}

/* Elegant Alert Styling */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left-color: var(--primary-color);
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border-left-color: var(--success-color);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
    border-left-color: var(--warning-color);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger-dark);
    border-left-color: var(--danger-color);
}

.alert-info {
    background: var(--info-light);
    color: var(--info-dark);
    border-left-color: var(--info-color);
}

/* Elegant Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="elegant" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M20 0 L40 20 L20 40 L0 20 Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23elegant)"/></svg>');
    opacity: 0.3;
}

/* Elegant Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

/* Elegant Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

/* Fix text visibility issues in elegant theme */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Fix headings in elegant theme */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
}

/* Fix specific h5 and h6 elements for better visibility */
h5.fw-bold,
h5.fw-bold.mb-3 {
    color: var(--text-light) !important;
    font-weight: 700 !important;
    /* text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1);}

h6.m-0.font-weight-bold.text-primary {
    /* color: var(--primary-color) !important; */
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Fix card header text specifically */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: var(--text-light) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Ensure h5 and h6 elements on dark backgrounds are light */
h5.fw-bold.mb-3,
h6.fw-bold.mb-3 {
    color: var(--text-light) !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Override for any h5 and h6 on dark backgrounds */
.bg-dark h5,
.bg-dark h6,
.bg-primary h5,
.bg-primary h6,
.card-header h5,
.card-header h6,
.navbar-dark h5,
.navbar-dark h6 {
    color: var(--text-light) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Fix form labels */
.form-label {
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* Fix table text */
.table {
    color: var(--text-primary) !important;
}

.table thead th {
    color: var(--text-light) !important;
}

.table tbody td {
    color: var(--text-primary) !important;
}

/* Elegant Compact Design */
/* Make content more compact for better space utilization */

/* Compact Card Styling */
.card {
    margin-bottom: 1rem;
    border-radius: 12px;
}

.card-header {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
}

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

/* Compact Button Styling */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
    margin: 0.125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

/* Compact Table Styling */
.table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
}

.table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

/* Compact Form Styling */
.form-control {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.form-label {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Compact Navigation */
.nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
    margin: 0 0.125rem;
}

.navbar-brand {
    font-size: 1.5rem;
}

/* Compact Sidebar */
.sidebar .nav-link {
    padding: 0.625rem 0.875rem !important;
    font-size: 0.85rem;
    margin: 0.125rem 0;
}

/* Compact Badge Styling */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 6px;
}

/* Compact Alert Styling */
.alert {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Compact Icon Sizing */
.fas, .far, .fab {
    font-size: 0.875rem;
}

.fa-lg {
    font-size: 1.125rem;
}

.fa-2x {
    font-size: 1.25rem;
}

.fa-3x {
    font-size: 1.5rem;
}

/* Compact Spacing */
.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

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

.mb-3 {
    margin-bottom: 1rem !important;
}

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

/* Compact Container Spacing */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Fix admin layout spacing */
body {
    padding-top: 0;
}

/* Ensure main content doesn't overlap with navbar */
main.col-md-9 {
    margin-top: 0;
    padding-top: 1rem;
}

/* Fix sidebar positioning */
.sidebar {
    position: sticky;
    top: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 1020;
}

/* Compact Row Spacing */
.row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Compact Button Groups */
.btn-group {
    gap: 0.25rem;
}

.btn-group .btn {
    margin: 0;
}

/* Compact Table Actions */
.table .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Compact Modal Styling */
.modal-dialog {
    margin: 1rem auto;
    max-width: 500px;
}

.modal-content {
    border-radius: 12px;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-body {
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* Elegant Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .table-responsive {
        border-radius: 10px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-header {
        padding: 0.875rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table thead th {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }
}
