/*
Theme Name: Time Tracking System
Theme URI: https://example.com/time-tracking-system
Author: Bolt
Author URI: https://bolt.new
Description: Tema de WordPress para sistema de gestión de empleados, fichajes y turnos. Incluye login para empleados y administradores, panel de control, control de fichaje, gestión de empleados, turnos, calendario laboral e informes mensuales. Diseño moderno con animaciones suaves.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: time-tracking-system
*/

/* ==========================================================================
   CSS Variables — same as the original React app
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;

  --secondary: #0f172a;

  --accent: #06b6d4;

  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --error: #dc2626;
  --error-light: #fee2e2;

  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  min-height: 100vh;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--neutral-800);
  background: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   WordPress Core Alignment Classes (required by WP)
   ========================================================================== */

.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--neutral-500); margin-top: 4px; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ==========================================================================
   Auth Pages (Login & Register)
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a5f 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}

.auth-card {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.5s ease-out;
}

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

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.auth-logo svg {
  width: 40px;
  height: 40px;
}

.auth-header h1,
.auth-header .auth-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-header p {
  font-size: 15px;
  color: var(--neutral-500);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
  padding: 12px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--neutral-800);
  background: var(--neutral-50);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group input::placeholder {
  color: var(--neutral-400);
}

/* Role selector */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.role-option {
  position: relative;
  display: block;
  padding: 16px 12px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--neutral-50);
}

.role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option:hover {
  border-color: var(--neutral-300);
  background: white;
}

.role-option.active {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.role-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.role-icon {
  font-size: 26px;
}

.role-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
}

.role-option.active .role-label {
  color: var(--primary-dark);
}

/* Buttons */
.btn-primary,
.tts-btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled),
.tts-btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
  text-decoration: none;
}

.btn-primary:active:not(:disabled),
.tts-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled,
.tts-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tts-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.tts-btn-blue { background: var(--primary); color: white; }
.tts-btn-blue:hover { background: var(--primary-dark); text-decoration: none; }

.tts-btn-green { background: var(--success); color: white; }
.tts-btn-green:hover { background: #15803d; text-decoration: none; }

.tts-btn-red { background: var(--error); color: white; }
.tts-btn-red:hover { background: #b91c1c; text-decoration: none; }

.tts-btn-gray {
  background: var(--neutral-200);
  color: var(--neutral-700);
}
.tts-btn-gray:hover { background: var(--neutral-300); text-decoration: none; }

.tts-btn:active { transform: scale(0.98); }

/* Error / success messages */
.error-message,
.tts-error {
  background: var(--error-light);
  color: var(--error);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.success-message,
.tts-success {
  background: var(--success-light);
  color: var(--success);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.4s ease-out;
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--neutral-500);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Loading
   ========================================================================== */

.loading-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--neutral-50);
  color: var(--neutral-500);
  font-size: 15px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--neutral-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ==========================================================================
   Dashboard Layout
   ========================================================================== */

.dashboard-page {
  min-height: 100vh;
  background: var(--neutral-50);
}

.dashboard-header {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.header-logo svg { width: 28px; height: 28px; }

.header-left h1,
.header-left .header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.01em;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-800);
}

.user-role {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
}

.role-admin {
  background: var(--success-light);
  color: var(--success);
}

.role-employee {
  background: var(--warning-light);
  color: var(--warning);
}

.btn-logout {
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  background: var(--error-light);
  border-color: var(--error);
  color: var(--error);
  text-decoration: none;
}

/* Dashboard body with sidebar */
.dashboard-body {
  display: flex;
  min-height: calc(100vh - 73px);
}

.dashboard-sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid var(--neutral-200);
  padding: 20px 12px;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-600);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.sidebar-nav a:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: var(--primary-50);
  color: var(--primary-dark);
}

.sidebar-nav a.active svg {
  color: var(--primary);
}

.sidebar-nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neutral-400);
  padding: 16px 14px 8px;
}

/* Dashboard content area */
.dashboard-main {
  flex: 1;
  padding: 32px;
  overflow-x: hidden;
}

.dashboard-content {
  max-width: 1100px;
  margin: 0 auto;
}

/* Welcome banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: white;
  margin-bottom: 28px;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.welcome-banner h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.welcome-banner p {
  font-size: 15px;
  opacity: 0.92;
  line-height: 1.5;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.info-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-icon.blue { background: var(--primary-100); color: var(--primary); }
.card-icon.green { background: var(--success-light); color: var(--success); }
.card-icon.amber { background: var(--warning-light); color: var(--warning); }
.card-icon.purple { background: #f3e8ff; color: #9333ea; }

.info-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.card-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 3px;
}

.card-sublabel {
  font-size: 13px;
  color: var(--neutral-400);
}

/* Section block */
.section-block {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-100);
  transition: background 0.2s, border-color 0.2s;
}

.feature-item:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
}

.feature-check {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-check svg { width: 18px; height: 18px; }

.feature-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 3px;
}

.feature-item p {
  font-size: 14px;
  color: var(--neutral-500);
  line-height: 1.4;
}

/* ==========================================================================
   Generic Card / Panel (for data views)
   ========================================================================== */

.tts-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.tts-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 16px;
}

.tts-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.tts-flex { display: flex; }
.tts-flex-between { display: flex; justify-content: space-between; align-items: center; }
.tts-gap-2 { gap: 8px; }
.tts-gap-4 { gap: 16px; }
.tts-gap-6 { gap: 24px; }
.tts-mb-6 { margin-bottom: 24px; }
.tts-mb-4 { margin-bottom: 16px; }
.tts-mb-8 { margin-bottom: 32px; }
.tts-mt-6 { margin-top: 24px; }

.tts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tts-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.tts-text-center { text-align: center; }
.tts-text-right { text-align: right; }
.tts-text-sm { font-size: 14px; }
.tts-text-xs { font-size: 12px; }
.tts-font-bold { font-weight: 700; }
.tts-font-semibold { font-weight: 600; }
.tts-font-medium { font-weight: 500; }
.tts-text-gray-500 { color: var(--neutral-500); }
.tts-text-gray-600 { color: var(--neutral-600); }
.tts-text-gray-900 { color: var(--neutral-900); }
.tts-text-blue-600 { color: var(--primary); }
.tts-text-green-600 { color: var(--success); }
.tts-text-red-600 { color: var(--error); }
.tts-bg-gray-50 { background: var(--neutral-50); }
.tts-bg-white { background: white; }
.tts-rounded-lg { border-radius: var(--radius-lg); }
.tts-rounded-md { border-radius: var(--radius-md); }
.tts-border { border: 1px solid var(--neutral-200); }
.tts-p-6 { padding: 24px; }
.tts-p-4 { padding: 16px; }
.tts-py-3 { padding-top: 12px; padding-bottom: 12px; }
.tts-py-4 { padding-top: 16px; padding-bottom: 16px; }
.tts-py-8 { padding-top: 32px; padding-bottom: 32px; }
.tts-px-4 { padding-left: 16px; padding-right: 16px; }
.tts-px-6 { padding-left: 24px; padding-right: 24px; }
.tts-space-y-4 > * + * { margin-top: 16px; }
.tts-space-y-3 > * + * { margin-top: 12px; }

/* Gradient hero (time clock) */
.tts-hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 32px;
}

.tts-hero-gradient h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tts-hero-gradient .tts-hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
}

.tts-hero-time {
  font-size: 48px;
  font-weight: 700;
  text-align: right;
}

/* Status badges */
.tts-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.tts-badge-green { background: var(--success-light); color: var(--success); }
.tts-badge-red { background: var(--error-light); color: var(--error); }
.tts-badge-amber { background: var(--warning-light); color: var(--warning); }

/* Tables */
.tts-table {
  width: 100%;
  border-collapse: collapse;
}

.tts-table thead {
  background: var(--neutral-50);
}

.tts-table th {
  padding: 12px 24px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--neutral-200);
}

.tts-table td {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
}

.tts-table tbody tr {
  transition: background 0.15s;
}

.tts-table tbody tr:hover {
  background: var(--neutral-50);
}

.tts-table tbody tr:last-child td {
  border-bottom: none;
}

.tts-table-wrap {
  overflow-x: auto;
}

/* Shift color chips */
.tts-shift-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.tts-shift-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
  border-left-width: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tts-shift-card:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

.tts-shift-dot {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
}

/* Calendar */
.tts-calendar-grid {
  display: grid;
  grid-template-columns: 140px repeat(7, 1fr);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tts-calendar-header {
  padding: 12px;
  background: var(--neutral-50);
  font-weight: 600;
  font-size: 14px;
  color: var(--neutral-700);
  text-align: center;
  border-right: 1px solid var(--neutral-200);
}

.tts-calendar-header:first-child {
  text-align: left;
}

.tts-calendar-cell {
  padding: 8px;
  min-height: 60px;
  border-top: 1px solid var(--neutral-100);
  border-right: 1px solid var(--neutral-100);
  font-size: 12px;
}

.tts-calendar-employee {
  padding: 12px;
  background: var(--neutral-50);
  font-weight: 600;
  font-size: 14px;
  color: var(--neutral-900);
  border-top: 1px solid var(--neutral-100);
  border-right: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
}

.tts-calendar-shift {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
}

.tts-calendar-shift-time {
  font-size: 10px;
  opacity: 0.9;
  margin-top: 2px;
}

/* Month navigation */
.tts-month-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tts-month-nav button {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--neutral-600);
  transition: background 0.2s;
}

.tts-month-nav button:hover {
  background: var(--neutral-100);
}

.tts-month-label {
  font-size: 18px;
  font-weight: 600;
  min-width: 200px;
  text-align: center;
  color: var(--neutral-900);
}

/* Empty state */
.tts-empty {
  text-align: center;
  padding: 32px;
  color: var(--neutral-500);
  font-size: 14px;
}

/* Form grid */
.tts-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tts-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.tts-input,
.tts-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--neutral-800);
  background: var(--neutral-50);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.tts-input:focus,
.tts-select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tts-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Stats cards */
.tts-stat-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.tts-stat-label {
  font-size: 14px;
  color: var(--neutral-600);
  margin-bottom: 4px;
}

.tts-stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--neutral-900);
}

/* Report card */
.tts-report-header {
  padding: 16px 24px;
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tts-report-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0;
}

.tts-report-header p {
  font-size: 14px;
  color: var(--neutral-600);
  margin: 0;
}

.tts-report-hours {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

/* SVG icon utility */
.tts-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tts-icon-sm { width: 16px; height: 16px; }
.tts-icon-lg { width: 28px; height: 28px; }

/* Animations - fade in on scroll */
.tts-fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

.tts-card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}

.tts-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .dashboard-body {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--neutral-200);
    padding: 12px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .sidebar-nav a {
    padding: 8px 12px;
    font-size: 13px;
  }

  .sidebar-section-label {
    display: none;
  }

  .dashboard-main {
    padding: 20px 16px;
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 28px 22px;
  }

  .auth-header h1 {
    font-size: 22px;
  }

  .role-selector {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    padding: 14px 18px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-left h1 {
    font-size: 16px;
  }

  .user-details {
    display: none;
  }

  .dashboard-main {
    padding: 20px 16px;
  }

  .welcome-banner {
    padding: 22px 20px;
  }

  .welcome-banner h2 {
    font-size: 20px;
  }

  .tts-grid-2,
  .tts-grid-3,
  .tts-form-grid {
    grid-template-columns: 1fr;
  }

  .tts-hero-time {
    font-size: 32px;
  }

  .tts-hero-gradient h2 {
    font-size: 22px;
  }

  .tts-calendar-grid {
    grid-template-columns: 80px repeat(7, minmax(50px, 1fr));
    font-size: 11px;
  }

  .tts-table {
    font-size: 13px;
  }

  .tts-table th,
  .tts-table td {
    padding: 10px 12px;
  }

  .tts-month-label {
    min-width: 140px;
    font-size: 16px;
  }
}
