/* WTLMS Custom Styles */

:root {
    /* ICTAZ Brand Colors */
    --primary-color: #004088;
    --secondary-color: #125193;
    --accent-color: #1a75ff;
    
    /* Text Colors */
    --text-light: #f8f9fa;
    --text-dark: #343a40;
    --text-muted: #6c757d;
    
    /* Status Colors */
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    /* Layout */
    --sidebar-width: 260px;
    --content-bg: #f4f6f9;
    
    /* Components */
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --hover-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.5rem;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Table Styles */
.tb-recent-row, td{
    cursor: pointer;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.card h5 {
    color: #000;
}

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

.card-header {
    background-color: aliceblue;
    color: var(--text-light);
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Layout */
body {
    background-color: var(--content-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

#content {
    flex: 1;
    padding: 0;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    box-sizing: border-box;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.fix-view {
    padding-left: var(--sidebar-width);
}
/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: var(--primary-color);
    color: var(--text-light);
    z-index: 1050;
    transition: all 0.3s ease;
    overflow-y: auto;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    color: white;
    transform: scale(1.1);
}

#sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Mobile Navbar */
.mobile-navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.mobile-navbar .navbar-brand {
    color: white;
    margin-left: 1rem;
    font-weight: 600;
}

/* Container and Content Spacing */
.container-fluid {
    padding: 0 !important;
}

#content {
    padding: 0 !important;
}

/* Admin Dashboard Spacing */
.admin-dashboard {
    padding: 1.5rem !important;
    margin-left: 1rem !important;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 767.98px) {
    .admin-dashboard {
        margin-left: 0 !important;
        padding: 1rem !important;
    }
}

.mobile-navbar + .container-fluid {
    padding-top: 1rem !important;
}

/* Responsive Sidebar */
@media (max-width: 767.98px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        box-shadow: none;
    }
    
    .sidebar.active {
        margin-left: 0;
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    #content {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .fix-view {
        padding-left: 0 !important;
    }
}

/* Floating Action Button */
#sidebarCollapse {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease;
}

#sidebarCollapse:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

#sidebarCollapse:active {
    transform: scale(0.95);
}

/* Sidebar Mini Mode (Desktop) */
.sidebar-mini .sidebar {
    width: 70px;
}

.sidebar-mini #content {
    width: calc(100% - 70px);
    margin-left: 70px;
}

.sidebar-mini .fix-view {
    padding-left: 70px;
}

.sidebar-mini .sidebar .sidebar-header h3,
.sidebar-mini .sidebar ul li a span,
.sidebar-mini .sidebar-footer .user-info .user-details {
    display: none;
}

.sidebar-mini .sidebar ul li a {
    justify-content: center;
    padding: 12px;
}

.sidebar-mini .sidebar ul li a i {
    margin-right: 0;
    font-size: 1.25rem;
}

.sidebar-mini .sidebar .sidebar-header {
    justify-content: center;
    padding: 15px 5px;
}

.sidebar-mini .sidebar .sidebar-header .logo {
    width: 40px;
    margin: 0;
}

.sidebar-mini .sidebar-footer .user-info {
    justify-content: center;
}

.sidebar-mini .sidebar-footer .user-info .avatar {
    margin-right: 0;
}

/* Hover effect for mini sidebar */
@media (min-width: 768px) {
    .sidebar-mini .sidebar:hover {
        width: var(--sidebar-width);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-mini .sidebar:hover .sidebar-header h3,
    .sidebar-mini .sidebar:hover ul li a span,
    .sidebar-mini .sidebar:hover .sidebar-footer .user-info .user-details {
        display: block;
    }
    
    .sidebar-mini .sidebar:hover ul li a {
        justify-content: flex-start;
        padding: 12px 15px;
    }
    
    .sidebar-mini .sidebar:hover ul li a i {
        margin-right: 10px;
        font-size: 1.1rem;
    }
    
    .sidebar-mini .sidebar:hover .sidebar-header {
        justify-content: center;
        padding: 20px;
    }
    
    .sidebar-mini .sidebar:hover .sidebar-header .logo {
        width: 80px;
        margin-bottom: 1rem;
    }
    
    .sidebar-mini .sidebar:hover .sidebar-footer .user-info {
        justify-content: flex-start;
    }
    
    .sidebar-mini .sidebar:hover .sidebar-footer .user-info .avatar {
        margin-right: 10px;
    }
}

#sidebar .sidebar-header {
    flex-direction: row;
    padding: 20px;
    background: var(--secondary-color);
    text-align: center;
}

#sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

#sidebar ul li {
    padding: 0 15px;
    margin-bottom: 5px;
}

#sidebar ul li a {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    opacity: 0.85;
}

#sidebar ul li a:hover,
#sidebar ul li a.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: translateX(5px);
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Stats Cards */
.stats-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-card .card-body {
    padding: 25px;
}

.stats-card .card-title {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

.stats-card p {
    color: #6c757d;
    margin: 5px 0 0;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    background: var(--primary-color);
    border-radius: 12px;
    padding: 20px;
}

.quick-actions .btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: none;
    transition: all 0.3s;
    opacity: 0.85;
}

.quick-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    opacity: 1;
}

.quick-actions .btn i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Tables */
.table-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status Colors */
.text-pending { color: var(--warning-color); }
.text-approved { color: var(--success-color); }
.text-rejected { color: var(--danger-color); }

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    #content {
        margin-left: 0;
        width: 100%;
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    .stats-card .card-body {
        padding: 15px;
    }

    .row {
        margin-right: 0;
        margin-left: 0;
    }
}

/* Alerts */
/* Alert and Badge Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.badge {
    font-weight: 500;
    padding: 0.5em 1em;
}

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

.badge.bg-secondary {
    background-color: var(--secondary-color) !important;
}

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

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    margin-top: auto;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: 600;
    color: white;
}

.user-details {
    flex: 1;
}

.user-details h6 {
    margin: 0;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.user-details span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-actions {
    display: flex;
    gap: 8px;
}

.footer-actions .btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    transition: all 0.3s;
}

.footer-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-actions .btn i {
    margin-right: 6px;
    font-size: 14px;
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .table {
        width: 100% !important;
    }
    
    .table th {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }
}
