* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background-color: #f4f6f9;
}

/* ===== Login Page ===== */
.login-page {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    color: #1e3c72;
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
}

/* ===== Sidebar ===== */
#wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #1e3c72;
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-company {
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    line-height: 1.5;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

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

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-right-color: #ffc107;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

#page-content-wrapper {
    flex: 1;
    margin-right: 260px;
    transition: all 0.3s;
}

/* ===== Cards & Stats ===== */
.stat-card {
    border-radius: 12px;
    border: none;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

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

/* ===== Tables ===== */
.table-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== RTL Fixes ===== */
.form-control:focus, .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 60, 114, 0.25);
}

.btn-primary {
    background-color: #1e3c72;
    border-color: #1e3c72;
}

.btn-primary:hover {
    background-color: #2a5298;
    border-color: #2a5298;
}

.badge {
    font-weight: 500;
}

.modal-header .btn-close {
    margin: 0;
}

/* ===== Sidebar Toggle (Desktop) ===== */
.sidebar.active {
    right: -260px;
}
#page-content-wrapper.active {
    margin-right: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        right: -260px;
    }
    .sidebar.active {
        right: 0;
    }
    #page-content-wrapper {
        margin-right: 0;
    }
}

/* ===== Notifications ===== */
.alert-fixed {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
}
