:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --sidebar-bg: #111827;
    --sidebar-text: #94A3B8;
    --sidebar-active: #FFFFFF;
    --bg-main: #F1F5F9;
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --accent: #10B981;
    --danger: #EF4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app {
    height: 100vh;
    width: 100vw;
    display: flex;
    overflow: hidden;
}

/* Sidebar Styling */
.main-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 10;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.sidebar-footer {
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

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

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.nav-section-title {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    gap: 12px;
}

.nav-item i, .nav-item .icon {
    font-size: 1.2rem;
    color: var(--primary);
    opacity: 0.7;
}

.nav-item:hover {
    color: var(--sidebar-active);
    background-color: rgba(255,255,255,0.03);
}

.nav-item.active {
    color: var(--sidebar-active);
    background-color: rgba(255,255,255,0.05);
    border-left: 4px solid var(--primary);
}

/* Topbar */
.topbar {
    height: 70px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.page-content {
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

/* Cards & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 1.2rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid transparent;
}

.stat-card:hover {
    border-bottom-color: var(--primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary);
    background: #f0fdf4;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

/* Table Area */
.table-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 1.5rem;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: var(--primary);
    color: white;
    text-align: right;
    padding: 0.8rem 1rem;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

tbody tr:hover {
    background-color: #f1f5f9 !important;
    transition: background-color 0.2s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Employee List Components */
.btn-edit {
    background: #EFF6FF;
    color: #2563EB;
    border: 1px solid #DBEAFE;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-edit:hover {
    background: #DBEAFE;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.badge-shift-admin {
    background: #E0F2FE;
    color: #0369A1;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #BAe6FD;
}

.badge-shift-academic {
    background: #F5F3FF;
    color: #5B21B6;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #DDD6FE;
    cursor: help;
}

.badge-status {
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-status-active {
    background: #D1FAE5;
    color: #065F46;
}

.badge-status-inactive {
    background: #FEE2E2;
    color: #991B1B;
}
