:root {
    --primary-red: #c01e2e;
    --primary-red-hover: #9c1724;
    --primary-grey: #636466;
    --light-grey: #808285;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Sleek modern scroll: hide visual scrollbar but keep functionality */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Auth Layout (Login) */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-color) 0%, #e0e6ed 100%);
}

.auth-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    max-width: 250px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-grey);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 30, 46, 0.1);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
}

/* Dashboard Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    background-color: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-header img {
    max-width: 100%;
    height: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--primary-grey);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: rgba(192, 30, 46, 0.05);
    color: var(--primary-red);
    border-right: 4px solid var(--primary-red);
}

.sidebar-menu a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex overflow */
}

.topbar {
    background-color: var(--white);
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-body {
    padding: 30px;
    overflow-y: auto;
}

/* Cards & Dashboard widgets */
.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    color: var(--primary-grey);
    font-size: 24px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-right: 20px;
}

.stat-icon.red {
    background-color: rgba(192, 30, 46, 0.1);
    color: var(--primary-red);
}

.stat-icon.grey {
    background-color: rgba(99, 100, 102, 0.1);
    color: var(--primary-grey);
}

.stat-details h3 {
    font-size: 28px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.stat-details p {
    color: var(--light-grey);
    font-size: 14px;
    margin: 0;
}

/* Tables */
.card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-responsive {
    overflow-x: auto;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px 25px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: #f8f9fa;
    color: var(--primary-grey);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges & Actions */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.badge-active { background-color: #e6f4ea; color: #1e8e3e; }
.badge-inactive { background-color: #fce8e6; color: #d93025; }

.action-btn {
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--white);
    text-decoration: none;
    margin-right: 5px;
    font-size: 14px;
}
.btn-edit { background-color: #fbbc04; color: var(--white); }
.btn-delete { background-color: var(--primary-red); color: var(--white); }
.btn-view { background-color: var(--primary-grey); color: var(--white); }

/* SweetAlert Fix for Modals */
.swal2-container {
    z-index: 99999 !important;
}

/* Flatpickr Fix for Modals */
.flatpickr-calendar {
    z-index: 9999999 !important;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 25px;
}

.full-width {
    grid-column: 1 / -1;
}

/* Modals / Checkboxes */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.permission-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.permission-item h4 {
    margin-bottom: 10px;
    color: var(--primary-grey);
    font-size: 15px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    color: var(--text-color);
    cursor: pointer;
}

