/* GESTIONALE TURNI - DESIGN SYSTEM & CSS UTILITIES */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Color Variables */
:root {
  /* Common colors */
  --blue: #3b82f6;
  --blue-dark: #1e3a8a;
  --yellow: #f59e0b;
  --indigo: #6366f1;
  --green: #10b981;
  --red: #ef4444;
  --purple: #8b5cf6;
  --gray: #6b7280;

  /* Theme: Light (Default) */
  --bg: #f0f4f9;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-opaque: #ffffff;
  --border: rgba(255, 255, 255, 0.45);
  --border-darker: rgba(229, 231, 235, 0.9);
  --text: #1f2937;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-rgb: 37, 99, 235;
  --primary-hover: #1d4ed8;
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
  --glass-border: 1px solid rgba(255, 255, 255, 0.4);
  --backdrop-blur: 16px;
  
  --table-header: #f3f4f6;
  --table-border: #e5e7eb;
  --table-row-hover: rgba(243, 244, 246, 0.6);
  --table-row-alt: rgba(249, 250, 251, 0.4);
  
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: #d1d5db;
}

/* Theme: Dark */
[data-theme="dark"] {
  --bg: #0b0f19;
  --surface: rgba(21, 32, 54, 0.65);
  --surface-opaque: #152036;
  --border: rgba(255, 255, 255, 0.08);
  --border-darker: rgba(255, 255, 255, 0.12);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: #3b82f6;
  --primary-rgb: 59, 130, 246;
  --primary-hover: #60a5fa;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
  
  --table-header: #1e293b;
  --table-border: #334155;
  --table-row-hover: rgba(30, 41, 59, 0.8);
  --table-row-alt: rgba(30, 41, 59, 0.3);

  --input-bg: rgba(15, 23, 42, 0.8);
  --input-border: #334155;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Glassmorphism Helper */
.glass {
  background: var(--surface);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: var(--border-darker) 1px solid;
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
}

/* Layout Utilities */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--gray);
}
.btn-secondary:hover {
  background-color: #55585d;
}

.btn-success {
  background-color: var(--green);
}
.btn-success:hover {
  background-color: #0d9488;
}

.btn-danger {
  background-color: var(--red);
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-pdf {
  background-color: #e11d48; /* Red rose */
}
.btn-pdf:hover { background-color: #be123c; }

.btn-xlsx {
  background-color: #15803d; /* Green Excel */
}
.btn-xlsx:hover { background-color: #166534; }

.btn-csv {
  background-color: #0284c7; /* Sky Blue */
}
.btn-csv:hover { background-color: #0369a1; }

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: var(--primary);
  color: white;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.form-control-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.col-3 { width: 25%; padding: 0 0.5rem; }
.col-4 { width: 33.333%; padding: 0 0.5rem; }
.col-6 { width: 50%; padding: 0 0.5rem; }
.col-12 { width: 100%; padding: 0 0.5rem; }

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s forwards;
}

.toast.success { background-color: var(--green); }
.toast.error { background-color: var(--red); }
.toast.warning { background-color: var(--yellow); }
.toast.info { background-color: var(--blue); }

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

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.modal-content {
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  border: 1px solid var(--border-darker);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
}

#holiday-badge {
  background-color: var(--red);
  color: white;
  margin-top: 0.4rem;
}

/* LOGIN VIEW */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border: 1px solid var(--border);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-badge {
  width: 60px;
  height: 60px;
  background-color: rgba(var(--primary-rgb), 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.logo-icon {
  color: var(--primary);
  width: 32px;
  height: 32px;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.input-icon-wrapper input {
  padding-left: 2.4rem;
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* APP SHELL LAYOUT */
#app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.mobile-header {
  display: none;
}

/* SIDEBAR */
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-left: none;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.brand-icon {
  color: var(--primary);
  width: 28px;
  height: 28px;
}

.sidebar-brand h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-brand span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: rgba(var(--primary-rgb), 0.05);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

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

.user-avatar i {
  width: 20px;
  height: 20px;
}

.user-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-link:hover {
  background-color: rgba(var(--primary-rgb), 0.08);
  color: var(--text);
}

.nav-link.active {
  background-color: var(--primary);
  color: white;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-darker);
  margin: 1rem 0;
}

.theme-toggle-row {
  margin-top: auto;
}

.logout-row:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

/* MAIN CONTENT */
.main-content {
  padding: 2.5rem;
  overflow-y: auto;
  height: 100vh;
}

.content-view {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.view-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.view-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* DASHBOARD */
.dashboard-controls {
  display: flex;
  gap: 0.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-card.blue .stat-icon { background-color: var(--blue); }
.stat-card.yellow .stat-icon { background-color: var(--yellow); }
.stat-card.indigo .stat-icon { background-color: var(--indigo); }
.stat-card.green .stat-icon { background-color: var(--green); }

.stat-content span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.2rem 0;
}

.stat-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  padding: 1.5rem;
}

.chart-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.chart-container {
  position: relative;
  height: 280px;
}

.chart-container-pie {
  position: relative;
  height: 280px;
  display: flex;
  justify-content: center;
}

.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.split-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.split-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: rgba(var(--primary-rgb), 0.03);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.recent-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.recent-item-meta span {
  font-size: 0.8rem;
  font-weight: 600;
}

.recent-item-meta p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.recent-item-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.breakdown-list {
  list-style: none;
}

.breakdown-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.breakdown-list li:last-child {
  border-bottom: none;
}

.empty-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* SHIFT FORM VIEW */
.glass-form {
  padding: 2rem;
  border: 1px solid var(--border-darker);
}

.form-sub-section {
  border-top: 1px solid var(--border-darker);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.sub-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sub-section-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.dynamic-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
  animation: fadeIn 0.2s ease-in-out;
}

.dynamic-row .form-group {
  margin-bottom: 0;
  flex: 1;
}

.dynamic-row .row-action-col {
  flex: 0;
}

.form-footer-buttons {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-darker);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.submit-combo {
  display: flex;
  gap: 1rem;
}

/* CALENDAR VIEW */
.calendar-legend {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.holiday {
  background-color: var(--red);
}

.legend-types-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.calendar-wrapper {
  padding: 1rem;
  border: 1px solid var(--border-darker);
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-darker);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.calendar-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(90px, 1fr);
  gap: 4px;
}

.calendar-day {
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background-color: rgba(var(--primary-rgb), 0.01);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 90px;
}

.calendar-day:hover {
  background-color: rgba(var(--primary-rgb), 0.06);
  transform: scale(1.02);
  z-index: 10;
}

.calendar-day.empty {
  background: transparent;
  border: none;
  cursor: default;
  pointer-events: none;
}

.calendar-day.holiday-day {
  background-color: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.15);
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 600;
}

.calendar-day.holiday-day .day-number {
  color: var(--red);
}

.day-holiday-label {
  font-size: 0.65rem;
  color: var(--red);
  font-weight: 500;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-shift-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: white;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: auto;
}

.day-overtime-label {
  font-size: 0.65rem;
  color: var(--indigo);
  font-weight: 500;
}

.day-allowance-label {
  font-size: 0.65rem;
  color: var(--green);
  font-weight: 500;
}

/* ARCHIVE VIEW */
.filter-panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: slideDown 0.2s forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-darker);
  padding-bottom: 0.5rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.filter-panel-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-darker);
  padding-top: 1rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.excel-table th, .excel-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--table-border);
}

.excel-table th {
  background-color: var(--table-header);
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--table-border);
  white-space: nowrap;
}

.excel-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.excel-table th.sortable:hover {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.excel-table tr {
  background-color: var(--surface-opaque);
}

.excel-table tr:nth-child(even) {
  background-color: var(--table-row-alt);
}

.excel-table tr:hover {
  background-color: var(--table-row-hover);
}

.sort-icon {
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.6;
}

.table-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: white;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-buttons {
  display: flex;
  gap: 0.35rem;
}

.pagination-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--table-border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-limit select {
  width: auto;
  display: inline-block;
  margin-left: 0.5rem;
}

/* REPORTS & EXPORTS VIEW */
.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.report-export-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.report-export-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.report-download-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-download-buttons .btn {
  width: 100%;
  padding: 0.8rem;
}

/* CSV Upload dropzone */
.upload-dropzone {
  border: 2px dashed var(--input-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  background-color: rgba(var(--primary-rgb), 0.01);
  transition: all 0.2s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* CONFIGURATION VIEW */
.config-tabs-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.config-tab-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.config-tab-btn:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
  color: var(--text);
}

.config-tab-btn.active {
  background-color: var(--primary);
  color: white;
}

.config-tab-content {
  padding: 2rem;
}

.config-tab-content h3 {
  font-weight: 600;
}

/* BACKUP VIEW */
.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
}

.backup-card {
  padding: 2rem;
}

.backup-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.scheduled-backup-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: rgba(var(--primary-rgb), 0.05);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.scheduled-backup-status i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.backup-list-container {
  overflow-y: auto;
  max-height: 400px;
}

/* RESPONSIVE MEDIA QUERIES */

@media (max-width: 1023px) {
  #app-layout {
    grid-template-columns: 1fr;
  }

  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 990;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  #mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
  }

  .mobile-logo-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }

  .sidebar {
    position: fixed;
    top: 60px;
    left: -260px;
    width: 260px;
    height: calc(100vh - 60px);
    transition: left 0.3s ease;
    border-right: 1px solid var(--border-darker);
  }

  .sidebar.active {
    left: 0;
  }

  .main-content {
    margin-top: 60px;
    padding: 1.5rem;
    height: calc(100vh - 60px);
  }

  .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }

  .reports-grid {
    grid-template-columns: 1fr;
  }

  .backup-grid {
    grid-template-columns: 1fr;
  }
  
  .col-3, .col-4, .col-6 {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .calendar-grid-header {
    font-size: 0.75rem;
  }
  
  .calendar-grid-body {
    grid-auto-rows: minmax(75px, 1fr);
  }
  
  .calendar-day {
    min-height: 75px;
    padding: 0.3rem;
  }
  
  .day-number {
    font-size: 0.75rem;
  }
  
  .day-shift-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.2rem;
  }
  
  .day-overtime-label, .day-allowance-label {
    display: none; /* Hide labels on mobile to save space */
  }

  .view-header {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-controls {
    width: 100%;
  }
  
  .dashboard-controls select {
    flex: 1;
  }

  .pagination-container {
    flex-direction: column;
    align-items: center;
  }
}
