/* 
 * Ezamu Dashboard - Main Stylesheet
 * Theme: OrangeRed (#ff4500), White (#ffffff), Grey (#808080)
 */

/* ===== CSS Variables ===== */
:root {
    /* Color Palette */
    --primary: #ff4500;        /* OrangeRed */
    --primary-dark: #e63e00;   /* Darker OrangeRed */
    --primary-light: #ff6a33;  /* Lighter OrangeRed */
    --primary-rgb: 255, 69, 0; /* RGB for transparency */
    
    --secondary: #808080;      /* Grey */
    --secondary-dark: #666666; /* Darker Grey */
    --secondary-light: #999999;/* Lighter Grey */
    
    --light: #ffffff;          /* White */
    --light-rgb: 255, 255, 255;
    
    --dark: #212529;           /* Bootstrap dark */
    
    /* Background Colors */
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-sidebar: #f8f9fa;
    --bg-hover: rgba(255, 69, 0, 0.05);
    
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #808080;
    
    /* Borders */
    --border-color: #dee2e6;
    --border-radius: 10px;
    --border-radius-sm: 5px;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-body);
    min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

/* ===== Navbar Styles ===== */
.navbar-custom {
    background-color: var(--primary) !important;
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1030;
    border: none;
}

.navbar-custom .navbar-brand {
    color: var(--light) !important;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: color var(--transition-fast);
}

.navbar-custom .navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-custom .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
    color: var(--light) !important;
}

.navbar-custom .dropdown-menu {
    background-color: var(--light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
    margin-top: 0.5rem;
}

.navbar-custom .dropdown-item {
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    transition: background-color var(--transition-fast);
}

.navbar-custom .dropdown-item:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
}

.navbar-custom .dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.navbar-custom .dropdown-divider {
    border-color: var(--border-color);
}

/* ===== Sidebar Styles ===== */
.sidebar {
    background-color: var(--bg-sidebar);
    min-height: calc(100vh - 56px);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 56px;
    z-index: 1020;
    transition: all var(--transition);
}

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

.sidebar .nav {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    margin: 0.125rem 0;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    width: 1.5rem;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar .nav-link:hover {
    color: var(--primary);
    background-color: var(--bg-hover);
    border-left-color: var(--primary);
    text-decoration: none;
}

.sidebar .nav-link.active {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.1);
    border-left-color: var(--primary);
    font-weight: 500;
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    right: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary);
}

.sidebar .nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar hr {
    border-color: var(--border-color);
    margin: 1rem 1.5rem;
    opacity: 0.5;
}
/*====== =card details */


/* Sidebar collapse/expand on mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        width: 250px;
        top: 56px;
        height: calc(100vh - 56px);
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1019;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* ===== Button Styles ===== */
.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--light);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-primary-custom:hover,
.btn-primary-custom:focus,
.btn-primary-custom:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

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

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

/* ===== Card Styles ===== */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    margin-bottom: 1.5rem;
}

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

.card-custom .card-header {
    background-color: var(--light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

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

.card-custom .card-footer {
    background-color: var(--light);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.card-header-custom {
    background-color: var(--primary);
    color: var(--light);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1rem 1.5rem;
}

/* ===== Form Styles ===== */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-section {
    background-color: var(--bg-sidebar);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.form-section h5 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ===== Table Styles ===== */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background-color: var(--bg-sidebar);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

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

.table-custom tbody tr {
    transition: background-color var(--transition-fast);
}

.table-custom tbody tr:hover {
    background-color: var(--bg-hover);
}

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

/* ===== Alert Styles ===== */
.alert-custom {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    border-left: 4px solid #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border-left: 4px solid #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border-left: 4px solid #055160;
}

/* ===== Badge Styles ===== */
.badge-custom {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50rem;
    letter-spacing: 0.5px;
}

.badge-primary-custom {
    background-color: var(--primary);
    color: var(--light);
}

.badge-secondary-custom {
    background-color: var(--secondary);
    color: var(--light);
}

.badge-light-custom {
    background-color: var(--light);
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.status-suspended {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* ===== Action Buttons ===== */
.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin-right: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ===== Login & Auth Pages ===== */
.auth-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 1rem;
}

.auth-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    margin: 0 auto;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 2rem;
    text-align: center;
}

.auth-header h3 {
    margin-bottom: 0.5rem;
}

.auth-body {
    padding: 2rem;
}

/* ===== Dashboard Specific ===== */
.stats-card {
    border: none;
    border-radius: var(--border-radius);
    transition: transform var(--transition);
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stats-icon-primary {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.stats-icon-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.stats-icon-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.stats-icon-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
}

/* ===== Loading Spinner ===== */
.spinner-custom {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
    border-width: 0.25rem;
}

/* ===== Utilities ===== */
.shadow-custom {
    box-shadow: var(--shadow) !important;
}

.shadow-custom-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

.rounded-custom-sm {
    border-radius: var(--border-radius-sm) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    .sidebar + .col-md-10 {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .action-btn {
        margin-bottom: 0.25rem;
        display: inline-block;
    }
}

@media (max-width: 576px) {
    .auth-card {
        margin: 0 1rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar-custom,
    .sidebar,
    .btn,
    .action-btn,
    .no-print {
        display: none !important;
    }
    
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .card-custom {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition) ease-in-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft var(--transition) ease-out;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-sidebar);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ===== Accessibility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Custom Overrides ===== */
.no-border {
    border: none !important;
}

.no-shadow {
    box-shadow: none !important;
}

.hover-shadow:hover {
    box-shadow: var(--shadow) !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.opacity-75 {
    opacity: 0.75 !important;
}

.opacity-50 {
    opacity: 0.5 !important;
}

/* ===== Z-index Layers ===== */
:root {
    --z-sidebar: 1020;
    --z-navbar: 1030;
    --z-dropdown: 1050;
    --z-modal: 1060;
    --z-tooltip: 1070;
}

/* ===== Custom Focus States ===== */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25) !important;
}

/* Fix for tab styling */
.nav-tabs-custom .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
}

.nav-tabs-custom .nav-link.active {
    background-color: white;
    border-color: #dee2e6 #dee2e6 white;
    border-bottom: 3px solid var(--primary);
}

.tab-content {
    background-color: white;
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1.5rem;
    border-radius: 0 0 0.375rem 0.375rem;
}