/* ==========================================================================
   EWIDENCJA PRACY - Modern Design System
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.15);
  
  --secondary: #475569;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

button, input, select, textarea {
  font-family: inherit;
}

body {
  font-family: var(--font-family);
  background-color: #f1f4f8;
  color: #1e293b;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* App Header (NEAT UI Navigation Bar A / B from IMG_5337.PNG) */
body.admin-mode,
body.admin-mode *,
body.admin-mode .btn,
body.admin-mode h1, body.admin-mode h2, body.admin-mode h3, body.admin-mode h4,
body.admin-mode .form-input, body.admin-mode .form-select, body.admin-mode .form-control,
body.admin-mode .modal-title, body.admin-mode .comp-title,
body.admin-mode .wd-compact-label, body.admin-mode .wd-compact-val,
body.admin-mode .data-table th, body.admin-mode .data-table td,
body.admin-mode .nav-link, body.admin-mode .toast-message {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
}

.app-header {
  background: linear-gradient(180deg, #2b3949 0%, #1e2733 100%);
  border-bottom: 1px solid #141c25;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
  text-decoration: none;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(180deg, #3b4e63 0%, #202b37 100%);
  color: white;
  border: 1px solid #141d26;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.role-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Language Switcher in Header & Login */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background: linear-gradient(180deg, #ffffff 0%, #d8e2ec 100%);
  color: #192430;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Cloud Auto-Save Status Pill */
.save-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.save-status-pill.saved {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.12);
}

.save-status-pill.saving {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.12);
}

.save-status-pill.error {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

/* Containers */
.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

/* Login View */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before, .login-wrapper::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}

.login-wrapper::before {
  width: 500px;
  height: 500px;
  background: #3b82f6;
  top: -150px;
  right: -150px;
  opacity: 0.4;
}

.login-wrapper::after {
  width: 400px;
  height: 400px;
  background: #8b5cf6;
  bottom: -100px;
  left: -100px;
  opacity: 0.4;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 10;
}

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

.login-header .brand-icon {
  margin: 0 auto 1rem;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: #fbfcfd;
  border: 1px solid #b2becb;
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(59, 130, 246, 0.25);
  background-color: #ffffff;
}

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

/* ==========================================================================
   NEAT UI BUTTONS (Matches IMG_5337.PNG: 9 Submit Btn)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.25;
}

/* 1. Light Glossy Button (Active Tab / Primary Accent in NEAT UI) */
.btn-primary, .btn-neat-light {
  background: linear-gradient(180deg, #ffffff 0%, #d8e2ec 100%);
  color: #192430;
  border: 1px solid #8e9eaf;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

.btn-primary:hover, .btn-neat-light:hover {
  background: linear-gradient(180deg, #ffffff 0%, #c8d5e2 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 6px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active, .btn-neat-light:active {
  background: linear-gradient(180deg, #c8d5e2 0%, #d8e2ec 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

/* 2. Medium Dark Slate Button (Navigation Bar B / Actions in NEAT UI) */
.btn-secondary, .btn-neat-slate {
  background: linear-gradient(180deg, #384a5e 0%, #202b37 100%);
  color: #ffffff;
  border: 1px solid #141d26;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.25);
  font-weight: 600;
}

.btn-secondary:hover, .btn-neat-slate:hover {
  background: linear-gradient(180deg, #445970 0%, #293747 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-secondary:active, .btn-neat-slate:active {
  background: linear-gradient(180deg, #1d2631 0%, #2b3948 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
}

/* 3. Dark Charcoal Button (Window Close / Danger / Logout in NEAT UI) */
.btn-danger, .btn-neat-dark {
  background: linear-gradient(180deg, #252e37 0%, #131920 100%);
  color: #f1f5f9;
  border: 1px solid #0b0f13;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

.btn-danger:hover, .btn-neat-dark:hover {
  background: linear-gradient(180deg, #303b47 0%, #1a222b 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  color: white;
  border: 1px solid #065f46;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 16px;
}

.btn-lg {
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  border-radius: 24px;
}

.btn-full {
  width: 100%;
}

/* Period Filter Bar (NEAT UI Navigation Bar / Card) */
.period-bar {
  position: sticky;
  top: 70px;
  z-index: 35;
  background: #ffffff;
  border: 1px solid #b2becb;
  border-radius: 12px;
  padding: 0.9rem 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.period-selectors {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #b2becb;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-icon.blue { background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%); color: #1e40af; border: 1px solid #93c5fd; }
.stat-icon.green { background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%); color: #166534; border: 1px solid #86efac; }
.stat-icon.purple { background: linear-gradient(180deg, #f3e8ff 0%, #e9d5ff 100%); color: #6b21a8; border: 1px solid #d8b4fe; }
.stat-icon.amber { background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%); color: #92400e; border: 1px solid #fcd34d; }

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
}

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

/* Company Tabs & Filter */
.filter-section {
  background: #ffffff;
  border: 1px solid #b2becb;
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.company-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.company-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #334155;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.company-pill:hover {
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  color: #0f172a;
}

.company-pill.active {
  background: linear-gradient(180deg, #384a5e 0%, #202b37 100%);
  color: #ffffff;
  border-color: #141d26;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* Card Section (NEAT UI Window Container) */
.card-section {
  background: #ffffff;
  border: 1px solid #b2becb;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 2rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-green {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-gray {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-blue {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.badge-amber {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Action Button Group */
.action-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Worker View Elements */
.worker-hero {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.worker-hero-info h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.worker-hero-info p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.worker-hero-stat {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: right;
}

.worker-hero-stat .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #38bdf8;
}

.worker-hero-stat .stat-sub {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* Quick Logger Card */
.logger-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.logger-diff-box {
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0;
  font-weight: 600;
}

.logger-diff-val {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
}

.quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.preset-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  transform: translateY(20px) scale(0.98);
  transition: var(--transition);
}

.modal-backdrop.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-content.modal-xl {
  max-width: 1050px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  position: sticky;
  bottom: 0;
  background: var(--bg-surface);
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.btn-close:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease-out;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }

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

/* Interactive Timesheet Table Inside Modal */
.timesheet-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.timesheet-grid-table th {
  background: #f8fafc;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.timesheet-grid-table td {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.timesheet-grid-table tr.weekend {
  background-color: #f8fafc;
}

.timesheet-grid-table input[type="time"],
.timesheet-grid-table input[type="text"],
.timesheet-grid-table input[type="number"] {
  width: 100%;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  text-align: center;
}

.timesheet-grid-table input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }
  
  .main-content {
    padding: 1rem 0.75rem 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .period-bar, .filter-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .worker-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .worker-hero-stat {
    width: 100%;
    text-align: left;
  }
}

/* ==========================================================================
   EXCEL SPREADSHEET VIEW FOR WORKER (Computer / Desktop)
   ========================================================================== */

/* ==========================================================================
   EXCEL SPREADSHEET VIEW FOR WORKER (Computer / Desktop)
   Styling: NEAT UI Controls (IMG_5337.PNG) + Exact Excel Replica (2026.xls)
   ========================================================================== */

/* Top Action / Control Bar (NEAT UI Navigation Bar B) */
.excel-toolbar {
  background: linear-gradient(180deg, #2b3949 0%, #1e2834 100%);
  border: 1px solid #141c25;
  border-radius: 14px;
  padding: 0.65rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 16px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 15px;
  z-index: 30;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-neat-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #1b2530 0%, #0f151c 100%);
  border: 1px solid #0b0f14;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.excel-toolbar .period-selectors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.excel-toolbar .form-select {
  background-color: #fbfcfd;
  border: 1px solid #64748b;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  padding: 0.35rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  width: auto;
}

/* The Paper Sheet Container */
.excel-paper-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.excel-paper-sheet {
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 
              0 22px 50px -12px rgba(15, 23, 42, 0.25),
              0 0 0 1px rgba(15, 23, 42, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.95);
  width: 100%;
  max-width: 980px;
  padding: 2.2rem 2.5rem 2.8rem;
  font-family: var(--font-family);
  color: #000000;
  box-sizing: border-box;
  position: relative;
}

/* Header Table (Strictly Rows 0 and 1 from Excel) */
.excel-header-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-family: var(--font-family);
}

.excel-header-table td {
  padding: 4px 6px;
  vertical-align: middle;
}

.eht-title {
  font-size: 12pt;
  font-weight: bold;
  text-align: left;
  color: #1e293b;
}

.eht-month {
  font-size: 13pt;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
}

.eht-year-lbl {
  font-size: 11pt;
  font-weight: bold;
  text-align: right;
  padding-right: 6px;
  color: #1e293b;
}

.eht-year {
  font-size: 13pt;
  font-weight: bold;
  text-align: center;
}

.eht-worker-lbl {
  font-size: 11pt;
  font-weight: bold;
  padding-top: 6px;
  text-align: left;
  color: #334155;
}

.eht-worker-val {
  font-size: 13.5pt;
  font-weight: 800;
  text-transform: uppercase;
  padding-top: 6px;
  letter-spacing: 0.5px;
  color: #0f172a;
}

/* Grid Table (Strictly 6 Columns with 3D NEAT UI Styling) */
.excel-table-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1.5px solid #141d26;
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed;
  font-size: 10pt;
  font-family: var(--font-family);
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Table Header in colors from NEAT UI (temp/IMG_5337.PNG) */
.excel-table-grid th {
  border: 1px solid #141d26;
  border-top: none;
  background: linear-gradient(180deg, #3d5269 0%, #2f4154 48%, #1f2c39 52%, #263647 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-family: var(--font-family);
  font-weight: 700;
  text-align: center;
  font-size: 8.5pt;
  line-height: 1.25;
  padding: 8px 3px;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  box-sizing: border-box;
}

.excel-table-grid thead tr th:first-child {
  border-left: none;
}
.excel-table-grid thead tr th:last-child {
  border-right: none;
}

.th-sub {
  display: block;
  font-size: 7.2pt;
  font-weight: 400;
  color: #cbd5e1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
  margin-top: 2px;
  white-space: normal;
  letter-spacing: 0.2px;
}

.excel-table-grid td {
  border: 1px solid #cbd5e1;
  padding: 3px 4px;
  vertical-align: middle;
  font-size: 10pt;
  background: #ffffff;
  transition: background-color 0.1s ease;
}

.excel-table-grid tr:hover td {
  background-color: #f0f7ff;
}

.excel-table-grid tr.weekend td {
  background-color: #f8fafc;
}

.excel-table-grid tr.weekend:hover td {
  background-color: #e8f2fe;
}

/* Rounded Cell Inputs with 3D Inset Shadows */
.excel-cell-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 4px 4px;
  font-family: inherit;
  font-size: 9.5pt;
  text-align: center;
  box-sizing: border-box;
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}

.excel-cell-input:hover {
  border-color: #94a3b8;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.excel-cell-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.excel-cell-input.notes {
  text-align: left;
  padding-left: 6px;
}

.excel-hours-cell {
  text-align: center;
  font-weight: bold;
  font-size: 10pt;
}

.excel-hours-cell.has-hours {
  color: #1e3a8a;
  font-weight: 800;
}

/* Total row (Row 34 from Excel) with 3D Depth */
.excel-sum-row td {
  border: 1px solid #94a3b8;
  padding: 8px 6px;
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}

.excel-sum-empty {
  border: none !important;
  background: transparent !important;
}

.excel-sum-label {
  text-align: right;
  font-weight: 800;
  font-size: 10.5pt;
  padding-right: 12px;
  color: #1e293b;
  border-top: 2px solid #334155 !important;
  border-bottom: 2px solid #334155 !important;
  border-left: 2px solid #334155 !important;
  border-right: 1px solid #94a3b8 !important;
  box-shadow: inset 0 1px 0 #ffffff;
}

.excel-sum-total {
  text-align: center;
  font-weight: 900;
  font-size: 11.5pt;
  color: #1e3a8a;
  border-top: 2px solid #334155 !important;
  border-bottom: 2px solid #334155 !important;
  border-left: 1px solid #94a3b8 !important;
  border-right: 2px solid #334155 !important;
  box-shadow: inset 0 1px 0 #ffffff;
}

/* Embedded Selectors inside Excel Header with 3D Bevelled Frames (Item 3 & 6 in temp/IMG_5337.PNG) */
.excel-header-select {
  font-family: var(--font-family);
  font-size: 11pt;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  padding: 6px 32px 6px 12px;
  color: #1e293b;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 10px) center;
}

.excel-header-select:hover {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 8px rgba(37, 99, 235, 0.15);
}

.excel-header-select:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff, 0 0 0 3px rgba(37, 99, 235, 0.25), 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Multi-Language Dropdown Selector with 3D Depth */
.lang-dropdown-select {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  color: #ffffff;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 9px) center;
}

.lang-dropdown-select:hover, .lang-dropdown-select:focus {
  border-color: #60a5fa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 2px rgba(96, 165, 250, 0.35);
}

.login-lang-dropdown {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(0, 0, 0, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Visibility Control: Hidden on Screen for Worker, Visible on Print */
.only-print {
  display: none !important;
}

@media print {
  .only-print {
    display: table !important;
  }
  div.only-print {
    display: block !important;
  }
}

/* ==================== ADMIN 3D SIDEBAR & WORKSPACE ==================== */
.admin-layout-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-sidebar-nav {
  display: none !important;
}

.admin-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.3rem;
  border-radius: 12px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
}

.admin-nav-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.admin-nav-btn.active {
  color: #38bdf8;
}

.admin-nav-icon {
  font-size: 2.2rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  /* Standalone 3D Extrusion / Layered Shadows */
  filter: 
    drop-shadow(0 2px 0px rgba(0, 0, 0, 0.5))
    drop-shadow(0 4px 4px rgba(0, 0, 0, 0.4))
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
  transform: perspective(300px) translateZ(8px);
}

.admin-nav-btn:hover .admin-nav-icon {
  transform: perspective(300px) translateZ(22px) scale(1.18);
  filter: 
    drop-shadow(0 3px 0px rgba(0, 0, 0, 0.6))
    drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45))
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}

.admin-nav-btn.active .admin-nav-icon {
  transform: perspective(300px) translateZ(26px) scale(1.22);
  filter: 
    drop-shadow(0 0 12px rgba(56, 189, 248, 0.65))
    drop-shadow(0 4px 0px rgba(0, 0, 0, 0.6))
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
}

.admin-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.admin-content-area {
  flex: 1;
  min-width: 0;
}

/* Compact minimalist table styling */
.compact-table th {
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f1f5f9;
}

.compact-table td {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  vertical-align: middle;
}

.minimalist-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.worker-name-link {
  font-weight: 700;
  color: #1e3a8a;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
  font-size: 0.9rem;
}

.worker-name-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.worker-position-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.compact-action-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
}

/* Home Overview Styles */
.home-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (max-width: 860px) {
  .home-overview-grid {
    grid-template-columns: 1fr;
  }
}

.home-comp-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  transition: all 0.15s ease;
}

.home-comp-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.quick-action-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-action-box:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.quick-action-box .qa-icon {
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Worker Details Grid Modal */
.worker-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
}

.wd-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: #f8fafc;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.wd-item.wd-full {
  grid-column: 1 / -1;
}

.wd-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.wd-value {
  font-size: 0.92rem;
  color: var(--slate-900);
}

/* Segmented Modal Tabs */
.modal-tabs-header {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  padding: 0 1.25rem;
  background: #f8fafc;
  gap: 0.5rem;
}

.modal-tab-btn {
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: var(--slate-900);
}

.modal-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ==================== COMPANIES MASTER-DETAIL LAYOUT ==================== */
.companies-master-detail {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 950px) {
  .companies-master-detail {
    grid-template-columns: 1fr;
  }
  .admin-layout-container {
    flex-direction: column;
  }
  .admin-sidebar-nav {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    position: static;
  }
}

.companies-list-col {
  background: var(--bg-surface);
  border-radius: 6px;
  border: 1px solid var(--border-light);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.company-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.company-card-item:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.company-card-item.selected {
  border-color: #2563eb;
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 6px 18px rgba(37, 99, 235, 0.12);
}

.comp-title {
  font-weight: 700;
  color: var(--slate-900);
  font-size: 1rem;
}

.comp-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.company-detail-col {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-height: 400px;
}

.company-empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.company-detail-card {
  padding: 1rem;
}

.cd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
  flex-wrap: wrap;
}

.cd-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.15rem;
  flex-wrap: wrap;
}

/* ==================== READONLY TIMESHEET STYLES ==================== */
.readonly-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background: rgba(254, 243, 199, 0.18);
  border: 1px solid #fef08a;
  border-radius: 6px;
  color: #fef08a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.readonly-time-val, .readonly-hours-val, .readonly-notes-val {
  display: block;
  padding: 5px 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #1e293b;
  text-align: center;
  border-radius: 4px;
}

.readonly-hours-val.has-hours {
  font-weight: 700;
  color: #0f172a;
  background: rgba(59, 130, 246, 0.12);
}

.readonly-notes-val {
  text-align: left;
  padding-left: 8px;
  font-size: 0.88rem;
}

/* ==========================================================================
   3D ELEMENTS FOR WORKERS TABLE (Pracownik, Stanowisko, Firma, Godziny)
   ========================================================================== */
.worker-3d-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1e293b;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.06), 
    inset 0 1px 0 #ffffff, 
    0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.worker-3d-name:hover {
  transform: translateY(-2px);
  color: #2563eb;
  border-color: #93c5fd;
  box-shadow: 
    0 4px 10px rgba(37, 99, 235, 0.15), 
    inset 0 1px 0 #ffffff;
}

.worker-3d-position {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  padding: 0.25rem 0.65rem;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.05), 
    inset 0 1px 0 #ffffff;
}

.worker-3d-company {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d4ed8;
  padding: 0.28rem 0.7rem;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: 7px;
  box-shadow: 
    0 2px 5px rgba(37, 99, 235, 0.12), 
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.worker-3d-hours {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #047857;
  padding: 0.28rem 0.75rem;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: 7px;
  box-shadow: 
    0 2px 5px rgba(5, 150, 105, 0.15), 
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.worker-3d-hours.zero {
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), inset 0 1px 0 #ffffff;
}

/* ==========================================================================
   WORKER DETAILS MODAL: COMPACT STACKED LIST
   ========================================================================== */
.worker-details-compact-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.wd-compact-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
}

.wd-compact-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wd-compact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.wd-compact-val {
  font-size: 0.9rem;
  color: #1e293b;
}

/* ==========================================================================
   INACTIVE DAYS (OUTSIDE EMPLOYMENT PERIOD)
   ========================================================================== */
tr.day-outside-employment {
  background-color: #f8fafc !important;
  opacity: 0.52;
}

tr.day-outside-employment td {
  color: #94a3b8 !important;
}

tr.day-outside-employment .excel-cell-input {
  background: #f1f5f9 !important;
  cursor: not-allowed !important;
  color: #94a3b8 !important;
}

/* ==========================================================================
   CLAYMORPHISM 3D DASHBOARD (SKETCH IMG_5633 & STYLES стиль.jpeg / форми.PNG)
   Three 3D Figures:
     1. Inverted L-shaped 3D Slab ("буква L трохи перевернута"):
        - Left top arm: Amber Clock + DATA ROK
        - Right vertical stem: 3D Clay Administrator + Switcher [ 👤 ] + Cześć!
     2. Tall Left Slab: "квадратик з ліва то панель працівників" (Big Native Clickable Button)
     3. Smaller Bottom-Right Slab: "Менший квадратик то теж кнопка і на ній список фірм" (Big Native Clickable Button)
   No left sidebar.
   ========================================================================== */
.clay-dashboard-wrapper {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.35rem 0 2rem 0;
}

/* Sketch proportions and native preview buttons. */
#admin-tab-home .clay-shapes-grid {
  grid-template-rows: 180px 170px 300px;
}
#admin-tab-home .clay-l-top-arm {
  min-width: 0;
  padding: 1.4rem;
  background: #eee8df;
}
#admin-tab-home .clay-l-right-stem {
  grid-row: 1 / 3;
  background: #eee8df;
  border-left: 0;
}
#admin-tab-home .clay-workers-slab { grid-row: 2 / 4; min-height: 0; }
#admin-tab-home .clay-firms-slab { grid-row: 3; min-height: 0; }
#admin-tab-home .clay-firms-slab .clay-engraved-item { min-height: 38px; padding: 0.45rem 0; }
#admin-tab-home .clay-firms-slab .clay-slab-header { margin-bottom: 0.6rem; }
#admin-tab-home .clay-big-btn-slab {
  appearance: none;
  font: inherit;
  text-align: left;
  min-width: 0;
  width: 100%;
  color: #38312b;
}
#admin-tab-home .clay-big-btn-slab:focus-visible,
#admin-tab-home .clay-pill-select:focus-visible,
#admin-tab-home .clay-sqbtn-switcher:focus-visible {
  outline: 3px solid #96651f;
  outline-offset: 5px;
}
#admin-tab-home .clay-clock-widget { gap: 0.8rem; }
#admin-tab-home .clay-clock-digital { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
#admin-tab-home .clay-date-capsule { flex-direction: column; border-radius: 24px; min-width: 0; }
#admin-tab-home .clay-date-badge-label { white-space: normal; font-size: 0.78rem; }
#admin-tab-home .dash-period-quick-select { display: flex; gap: 0.4rem; flex-wrap: wrap; }
#admin-tab-home .clay-avatar-frame { width: 155px; height: 230px; border: 0; box-shadow: none; background: transparent; }
#admin-tab-home .clay-avatar-img { object-fit: contain; mix-blend-mode: multiply; }
#admin-tab-home .clay-avatar-top-row { justify-content: center; gap: 1.8rem; }
#admin-tab-home .clay-avatar-info { margin-top: 0; }
#admin-tab-home .clay-engraved-list { overflow: hidden; gap: 0; padding: 0; max-height: none; }
#admin-tab-home .clay-engraved-item {
  min-height: 48px;
  padding: 0.7rem 0;
  gap: 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d6cdbf;
  border-radius: 0;
  box-shadow: 0 1px 0 #fff8;
}
#admin-tab-home .clay-worker-left,
#admin-tab-home .clay-firm-left { min-width: 0; }
#admin-tab-home .clay-engraved-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #635a4f; }
#admin-tab-home .clay-engraved-tag {
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #786b59;
}
@media (max-width: 960px) {
  #admin-tab-home .clay-shapes-grid { grid-template-rows: auto; }
  #admin-tab-home .clay-l-top-arm,
  #admin-tab-home .clay-l-right-stem,
  #admin-tab-home .clay-workers-slab,
  #admin-tab-home .clay-firms-slab { grid-row: auto; min-height: 0; }
  #admin-tab-home .clay-l-top-arm { flex-wrap: wrap; justify-content: center; }
  #admin-tab-home .clay-l-right-stem { border: 2.5px solid #fff; }
  #admin-tab-home .clay-workers-slab,
  #admin-tab-home .clay-firms-slab { padding: 1.4rem; }
}

/* One continuous surface; both content areas sit above the same silhouette. */
#admin-tab-home .clay-l-shape-unified {
  display: grid;
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  column-gap: 1.6rem;
  position: relative;
  min-width: 0;
}
#admin-tab-home .clay-unified-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 5px 1px #a9a69e) drop-shadow(0 12px 14px #343e4926);
}
#admin-tab-home .clay-l-top-arm,
#admin-tab-home .clay-l-right-stem {
  background: none;
  border: 0;
  box-shadow: none;
  margin: 0;
  min-height: 0;
  grid-row: 1;
}
#admin-tab-home .clay-l-top-arm { height: 180px; align-self: start; }
#admin-tab-home .clay-l-right-stem { padding: 1rem 2rem 1.4rem; }
#admin-tab-home .clay-avatar-frame {
  width: 210px;
  height: 265px;
  overflow: visible;
  border-radius: 0;
}
#admin-tab-home .clay-avatar-img {
  mix-blend-mode: normal;
  filter: drop-shadow(4px 7px 4px #28374326);
}
#admin-tab-home .clay-avatar-frame:hover { transform: none; }
#admin-tab-home .clay-avatar-role { background: transparent; border: 0; box-shadow: none; padding: 0; color: #947443; }
#admin-tab-home .clay-avatar-greeting { color: #293a45; }
#admin-tab-home .clay-slab {
  background: linear-gradient(155deg, #f5f4f1, #d7d4ce);
  border: 1px solid #fff;
  border-radius: 28px;
  box-shadow: 0 5px 1px #aaa79f, 0 12px 18px #34414b26, inset 0 2px 2px #fff;
}
#admin-tab-home .clay-slab:hover { border-color: #c2a16b; transform: translateY(-2px); }
#admin-tab-home .clay-slab:active { transform: translateY(3px); box-shadow: 0 1px 1px #aaa79f, inset 0 2px 5px #8e8c8755; }
#admin-tab-home .clay-slab-title { color: #293b47; letter-spacing: 0.01em; }
#admin-tab-home .clay-btn-footer-hint {
  background: linear-gradient(#354a59, #172731);
  border: 1px solid #aeb7bc;
  color: #f1ede4;
  box-shadow: inset 0 1px 1px #ffffff60, 0 2px 2px #7778;
  font-weight: 600;
}
#admin-tab-home .clay-slab:hover .clay-btn-footer-hint { color: #e4c18c; }
#admin-tab-home .clay-engraved-item { border-bottom-style: dotted; }
#admin-tab-home .clay-date-capsule { background: #d9d6cf; }
@media (max-width: 960px) {
  #admin-tab-home .clay-l-shape-unified {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: 1fr;
    background: linear-gradient(155deg, #f9f8f5, #d6d3cc);
    border: 1px solid #fff;
    border-radius: 28px;
    box-shadow: 0 5px 1px #aaa79f, 0 12px 18px #34414b26;
  }
  #admin-tab-home .clay-unified-surface { display: none; }
  #admin-tab-home .clay-l-top-arm { height: auto; grid-row: 1; }
  #admin-tab-home .clay-l-right-stem { grid-column: 1; grid-row: 2; }
}

/* Raised clock and date, stone-cut preview lettering. */
#admin-tab-home .clay-clock-face {
  width: 136px; height: 136px; min-width: 136px;
  border: 7px solid #e8e4dc;
  background: radial-gradient(circle at 35% 25%, #fffef9, #e6e0d4 80%);
  box-shadow: 0 8px 0 #a6a093, 0 12px 0 #cbc4b7, 5px 20px 17px #26313e44,
    inset 0 0 0 2px #b2a080, inset 2px 4px 8px #74685040;
  transform: translateY(-9px);
}
#admin-tab-home .clock-tick {
  position: absolute; inset: 7px;
  transform: rotate(calc(var(--tick) * 6deg));
}
#admin-tab-home .clock-tick::before {
  content: ''; display: block; width: 1px; height: 4px;
  background: #837968; margin: 0 auto;
}
#admin-tab-home .clock-tick-hour::before { width: 3px; height: 9px; background: #35424b; border-radius: 1px; }
#admin-tab-home .hand-hour { height: 31px; }
#admin-tab-home .hand-minute { height: 43px; }
#admin-tab-home .hand-second { height: 48px; background: #a98142; }
#admin-tab-home .clay-date-capsule {
  padding: 1rem 1.6rem;
  background: linear-gradient(#fffefa, #dfdad0);
  border: 1px solid #fff;
  box-shadow: 0 5px 0 #b8b0a1, 3px 12px 12px #303c492b, inset 0 2px 2px #fff;
  transform: translateY(-5px);
}
#admin-tab-home .clay-date-badge-label { font-size: 1rem; line-height: 1.5; color: #5e594e; }
#admin-tab-home .clay-slab-header { justify-content: flex-end; border: 0; margin-bottom: 0.5rem; padding: 0; }
#admin-tab-home .clay-count-badge { background: transparent; box-shadow: none; padding: 0; color: #82796b; }
#admin-tab-home .clay-engraved-item { border: 0; box-shadow: none; }
#admin-tab-home .clay-engraved-name,
#admin-tab-home .clay-engraved-tag,
#admin-tab-home .clay-engraved-bullet {
  color: #8b8376;
  text-shadow: 0 1px 0 #fff, 0 -1px 1px #504b4499;
  font-weight: 600;
}
#admin-tab-home .clay-engraved-bullet { font-size: 1rem; }
#admin-tab-home .clay-avatar-frame { position: relative; isolation: isolate; perspective: 600px; }
#admin-tab-home .clay-avatar-frame::after {
  content: ''; position: absolute; z-index: -1;
  bottom: -3px; left: 20%; width: 64%; height: 20px;
  border-radius: 50%;
  background: linear-gradient(#f8f4ec, #c5bcae);
  box-shadow: 0 5px 0 #a79e90, 7px 13px 12px #35404a3b;
}
#admin-tab-home .clay-avatar-img {
  transform: translateY(-5px) translateZ(24px);
  filter: drop-shadow(14px 12px 5px #343b464d);
}

/* Incised lettering follows the stone surface instead of floating above it. */
#admin-tab-home .clay-engraved-name,
#admin-tab-home .clay-engraved-tag,
#admin-tab-home .clay-engraved-bullet {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 600;
  color: #746e63;
  text-shadow: 0 1px 0 #fff, 1px 2px 1px #fff9, 0 -1px 1px #39352cc9;
}
#admin-tab-home .clay-engraved-name { font-size: 1.15rem; }
#admin-tab-home .clay-engraved-tag { font-size: 0.95rem; }

/* Quiet, consistent directory surfaces; scoped away from worker and print views. */
:is(#admin-tab-workers, #admin-tab-companies) { color: #303c42; }
:is(#admin-tab-workers, #admin-tab-companies) .period-bar {
  background: #eeece7;
  border: 1px solid #fff;
  border-radius: 18px;
  box-shadow: 0 3px 12px #29333c0c;
  padding: 1rem !important;
}
:is(#admin-tab-workers, #admin-tab-companies) .form-input {
  background: #faf9f6; border-color: #d5d2ca; border-radius: 10px; box-shadow: none;
  min-height: 40px;
}
:is(#admin-tab-workers, #admin-tab-companies) .btn {
  min-height: 34px; border-radius: 9px; box-shadow: none;
  font-weight: 600;
}
:is(#admin-tab-workers, #admin-tab-companies) .btn-primary {
  background: #334550; border: 1px solid #334550; color: #fff;
}
:is(#admin-tab-workers, #admin-tab-companies) .btn-secondary {
  background: #faf9f6; border: 1px solid #d5d2ca; color: #3c484e;
}
:is(#admin-tab-workers, #admin-tab-companies) .btn-danger {
  background: transparent; color: #9c5550; border-color: transparent;
}
:is(#admin-tab-workers, #admin-tab-companies) .btn:focus-visible,
:is(#admin-tab-workers, #admin-tab-companies) a:focus-visible { outline: 2px solid #9a7944; outline-offset: 3px; }
#admin-tab-workers .directory-company-filters { display: flex; flex-wrap: wrap; gap: 6px; order: 3; flex-basis: 100%; }
#admin-tab-workers .company-pill { background: transparent; border: 1px solid #d5d2ca; box-shadow: none; color: #656a68; font-size: 0.8rem; }
#admin-tab-workers .company-pill.active { background: #334550; border-color: #334550; color: white; }
:is(#admin-tab-workers, #admin-tab-companies) table { border-collapse: separate; border-spacing: 0; }
:is(#admin-tab-workers, #admin-tab-companies) th { background: #eceae4; color: #797b76; font-size: 0.72rem; letter-spacing: 0.04em; }
:is(#admin-tab-workers, #admin-tab-companies) td { padding: 1rem 0.85rem; border-bottom: 1px solid #e9e7e1; }
:is(#admin-tab-workers, #admin-tab-companies) tbody tr:hover { background: #f5f3ed; }
#admin-tab-workers :is(.worker-3d-name, .worker-3d-position, .worker-3d-company, .worker-3d-hours) {
  background: transparent; border: 0; box-shadow: none; text-shadow: none; padding: 0; border-radius: 0;
  color: #4f5a60; transform: none;
}
#admin-tab-workers .worker-3d-name { color: #273b47; font-weight: 650; }
#admin-tab-workers .worker-3d-hours { font-variant-numeric: tabular-nums; }
#admin-tab-companies .companies-master-detail { gap: 0.85rem; grid-template-columns: minmax(230px, 0.8fr) minmax(0, 2fr); }
#admin-tab-companies .company-card-item { background: #faf9f6; border: 1px solid #ebe8e1; border-radius: 6px; box-shadow: none; padding: 0.75rem 1rem; }
#admin-tab-companies .company-card-item.selected { background: #ebe7dd; border-color: #af9570; box-shadow: inset 3px 0 #af9570; }
#admin-tab-companies .company-card-item:hover { transform: none; border-color: #af9570; }
#admin-tab-companies .comp-title { font-size: 0.95rem; color: #293e49; }
#admin-tab-companies .company-detail-col { min-width: 0; background: #faf9f6; box-shadow: none; border-color: #ebe8e1; border-radius: 6px; }
#admin-tab-companies .table-responsive { overflow-x: auto; }
#admin-tab-companies .data-table { min-width: 850px; }
#admin-tab-companies .data-table td:first-child { min-width: 150px; }
#admin-tab-companies .comp-notes { color: #83857f; font-size: 0.8rem; line-height: 1.5; }
#admin-tab-companies :is(.company-detail-card, .company-empty-state) { border: 1px solid #ebe8e1; border-radius: 6px; box-shadow: none; background: #faf9f6; }
#admin-tab-companies .badge { background: #eeeae1; color: #656d6e; border: 0; box-shadow: none; }
@media (max-width: 960px) {
  #admin-tab-companies .companies-master-detail { grid-template-columns: 1fr; }
  #admin-tab-companies .companies-list-col { max-height: 260px; overflow: auto; }
}

/* Master Grid of the 3 figures (IMG_5633) */
.clay-shapes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  column-gap: 1.6rem;
  row-gap: 1.6rem;
  width: 100%;
  align-items: stretch;
}

/* Base 3D Clay Extruded Slab (стиль.jpeg) */
.clay-slab {
  background: linear-gradient(145deg, #f7f3ec 0%, #ede6dc 60%, #e2dacd 100%);
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 34px;
  box-shadow: 
    14px 14px 28px rgba(184, 172, 156, 0.42), 
    -12px -12px 26px rgba(255, 255, 255, 0.95), 
    inset 1px 1px 2px rgba(255, 255, 255, 0.85);
  position: relative;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   FIGURE 1: INVERTED L-SHAPED 3D SLAB ("БУКВА L")
   Unified compound figure formed by:
     - Left horizontal arm: Clock + DATA ROK
     - Right vertical stem: Avatar + Switcher + Cześć!
   ========================================================================== */
.clay-l-shape-unified {
  display: contents;
}

/* Left arm of the L (Clock + DATA ROK) */
.clay-l-top-arm {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(145deg, #f7f3ec 0%, #ede6dc 60%, #e2dacd 100%);
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  border-top-left-radius: 36px;
  border-bottom-left-radius: 36px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none !important;
  margin-right: -1.65rem;
  padding: 1.4rem 2.2rem 1.4rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 155px;
  z-index: 2;
  box-shadow: 
    0 14px 28px rgba(184, 172, 156, 0.28), 
    -12px -12px 26px rgba(255, 255, 255, 0.95),
    inset 1px 1px 2px rgba(255, 255, 255, 0.85);
  position: relative;
}

/* Right vertical stem of the L (Avatar + Switcher + Cześć!) */
.clay-l-right-stem {
  grid-column: 2;
  grid-row: 1;
  background: linear-gradient(145deg, #f7f3ec 0%, #ede6dc 60%, #e2dacd 100%);
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  border-top-right-radius: 36px;
  border-bottom-right-radius: 36px;
  border-bottom-left-radius: 36px;
  border-top-left-radius: 0;
  padding: 1.4rem 1.6rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 310px;
  z-index: 1;
  box-shadow: 
    14px 14px 28px rgba(184, 172, 156, 0.42), 
    0 -12px 26px rgba(255, 255, 255, 0.95), 
    inset 1px 1px 2px rgba(255, 255, 255, 0.85);
  position: relative;
}

/* WARM AMBER 3D ANALOG CLOCK (форми.PNG) */
.clay-clock-widget {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.clay-clock-face {
  width: 98px;
  height: 98px;
  min-width: 98px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 35% 35%, #fffbeb 0%, #fef3c7 35%, #fbb723 75%, #d97706 100%);
  border: 4.5px solid #ffffff;
  box-shadow: 
    0 12px 24px rgba(217, 119, 6, 0.28), 
    inset 0 3px 6px rgba(255, 255, 255, 0.95), 
    inset 0 -4px 8px rgba(180, 83, 9, 0.35);
}

.clay-clock-face .clock-marker {
  position: absolute;
  background: #78350f;
  border-radius: 2px;
}
.clay-clock-face .clock-marker.marker-12 {
  width: 4px;
  height: 8px;
  top: 5px;
  left: calc(50% - 2px);
  background: #451a03;
}
.clay-clock-face .clock-marker.marker-6 {
  width: 4px;
  height: 8px;
  bottom: 5px;
  left: calc(50% - 2px);
  background: #451a03;
}
.clay-clock-face .clock-marker.marker-3 {
  width: 8px;
  height: 4px;
  right: 5px;
  top: calc(50% - 2px);
  background: #451a03;
}
.clay-clock-face .clock-marker.marker-9 {
  width: 8px;
  height: 4px;
  left: 5px;
  top: calc(50% - 2px);
  background: #451a03;
}

.clay-clock-face .clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  border-radius: 4px;
  transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

.clay-clock-face .clock-hand.hand-hour {
  width: 4.5px;
  height: 28px;
  margin-left: -2.25px;
  background: #262626;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.clay-clock-face .clock-hand.hand-minute {
  width: 3.2px;
  height: 38px;
  margin-left: -1.6px;
  background: #404040;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  z-index: 3;
}

.clay-clock-face .clock-hand.hand-second {
  width: 1.5px;
  height: 44px;
  margin-left: -0.75px;
  background: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.45);
  z-index: 4;
}

.clay-clock-face .clock-center-pin {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #f59e0b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  top: calc(50% - 5px);
  left: calc(50% - 5px);
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.clay-clock-digital-box {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.clay-clock-digital {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
  font-size: 1.85rem;
  font-weight: 900;
  color: #38312b;
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85);
}

.clay-clock-sublabel {
  font-size: 0.74rem;
  font-weight: 700;
  color: #8c7c6d;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.65);
}

/* DATA ROK ENGRAVED CLAY CAPSULE */
.clay-date-capsule {
  background: #e2dad0;
  border-radius: 9999px;
  padding: 0.6rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 
    inset 3px 3px 6px rgba(165, 153, 137, 0.48), 
    inset -2px -2px 5px rgba(255, 255, 255, 0.85);
}

.clay-date-badge-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.86rem;
  color: #38312b;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
}

.clay-date-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.clay-pill-select {
  background: linear-gradient(145deg, #ffffff 0%, #ece5db 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #38312b;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  outline: none;
  box-shadow: 
    2px 2px 5px rgba(180, 168, 153, 0.35), 
    -1px -1px 3px rgba(255, 255, 255, 0.9), 
    inset 0 1px 0 #ffffff;
  transition: all 0.15s ease;
}

.clay-pill-select:hover {
  background: #ffffff;
  box-shadow: 
    3px 3px 7px rgba(180, 168, 153, 0.45), 
    inset 0 1px 0 #ffffff;
}

.clay-pill-select option {
  background: #ffffff;
  color: #38312b;
}

/* AVATAR TOP ROW & GREETING INSIDE RIGHT STEM */
.clay-avatar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.clay-avatar-frame {
  width: 105px;
  height: 125px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa 0%, #ffedd5 100%);
  border: 3.5px solid #ffffff;
  box-shadow: 
    7px 7px 16px rgba(180, 168, 153, 0.4), 
    -4px -4px 10px rgba(255, 255, 255, 0.9), 
    inset 0 2px 4px rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clay-avatar-frame:hover {
  transform: scale(1.05);
}

.clay-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  user-select: none;
}

.clay-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 1rem;
}

.clay-avatar-greeting {
  font-size: 2.3rem;
  font-weight: 900;
  color: #38312b;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.9);
}

.clay-avatar-role {
  font-size: 0.84rem;
  font-weight: 800;
  color: #92400e;
  background: rgba(254, 243, 199, 0.85);
  padding: 0.25rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.12);
  align-self: flex-start;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

/* 3D SQUARE SWITCHER BUTTON */
.clay-sqbtn-switcher {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #ece5db 100%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 
    6px 6px 14px rgba(180, 168, 153, 0.42), 
    -4px -4px 10px rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
}

.clay-sqbtn-switcher:hover {
  transform: translateY(-2px) scale(1.06);
  border-color: #f59e0b;
  box-shadow: 
    8px 8px 18px rgba(217, 119, 6, 0.25), 
    -5px -5px 12px rgba(255, 255, 255, 1);
}

.clay-sqbtn-switcher:active {
  transform: translateY(2px) scale(0.95);
  box-shadow: 
    inset 3px 3px 6px rgba(165, 153, 137, 0.5), 
    inset -2px -2px 4px rgba(255, 255, 255, 0.85);
}

.clay-sqbtn-icon {
  font-size: 1.5rem;
  line-height: 1;
}

/* ==========================================================================
   FIGURES 2 & 3: TWO BIG NATIVE CLICKABLE 3D BUTTON SLABS
   "Працівники і фірми то дві великі нативні кнопки"
   ========================================================================== */
.clay-big-btn-slab {
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
}

.clay-big-btn-slab:hover {
  transform: translateY(-4px);
  border-color: #fbbf24;
  box-shadow: 
    16px 18px 34px rgba(184, 172, 156, 0.5), 
    -14px -14px 28px rgba(255, 255, 255, 1);
}

.clay-big-btn-slab:active {
  transform: translateY(2px) scale(0.995);
  box-shadow: 
    8px 8px 18px rgba(184, 172, 156, 0.38), 
    inset 1px 1px 3px rgba(165, 153, 137, 0.25);
}

/* FIGURE 2: TALL LEFT SLAB - PRACOWNICY */
.clay-workers-slab {
  grid-column: 1;
  grid-row: 2;
  border-radius: 36px;
  padding: 1.6rem 1.8rem;
  min-height: 480px;
}

/* FIGURE 3: SMALLER BOTTOM-RIGHT SLAB - FIRMY */
.clay-firms-slab {
  grid-column: 2;
  grid-row: 2;
  border-radius: 36px;
  padding: 1.6rem 1.7rem;
  min-height: 320px;
}

.clay-slab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid rgba(184, 172, 156, 0.2);
}

.clay-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clay-header-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.clay-slab-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #38312b;
  letter-spacing: 0.04em;
  margin: 0;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85);
}

.clay-count-badge {
  background: #ded6c9;
  color: #443a32;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  box-shadow: 
    inset 2px 2px 4px rgba(165, 153, 137, 0.45), 
    inset -1px -1px 3px rgba(255, 255, 255, 0.75);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
}

/* ENGRAVED PREVIEW LIST ("кожного не можна натиснути, то просто підгляд що там є") */
.clay-engraved-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.4rem;
  margin-bottom: 1rem;
}

.clay-engraved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.25rem;
  background: #e2dbcf;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    inset 3px 3px 6px rgba(165, 153, 137, 0.45), 
    inset -2px -2px 5px rgba(255, 255, 255, 0.85);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.75);
  pointer-events: none; /* Clicking anywhere on the item triggers the parent button */
}

.clay-worker-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clay-engraved-number {
  font-weight: 900;
  font-size: 0.95rem;
  color: #b45309;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85);
}

.clay-engraved-name {
  font-weight: 800;
  font-size: 1rem;
  color: #2c2723;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.85);
}

.clay-engraved-tag {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 10px;
  background: rgba(254, 243, 199, 0.75);
  color: #92400e;
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 1px 1px 3px rgba(180, 168, 153, 0.25);
  white-space: nowrap;
}

.clay-engraved-tag.empty {
  background: rgba(241, 245, 249, 0.6);
  color: #64748b;
  border-color: rgba(203, 213, 225, 0.5);
}

.clay-firm-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clay-engraved-bullet {
  font-size: 1.55rem;
  color: #b45309;
  line-height: 1;
}

.clay-engraved-arrow {
  font-size: 1.1rem;
  color: #8c7c6d;
}

.clay-empty-note {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #8c7c6d;
  font-size: 0.92rem;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

/* BUTTON FOOTER HINT PILL */
.clay-btn-footer-hint {
  margin-top: auto;
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  background: #ded6c9;
  color: #78350f;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 
    inset 2px 2px 4px rgba(165, 153, 137, 0.4), 
    inset -1px -1px 3px rgba(255, 255, 255, 0.75);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.clay-big-btn-slab:hover .clay-btn-footer-hint {
  background: #fde68a;
  color: #92400e;
  box-shadow: 
    0 2px 6px rgba(245, 158, 11, 0.25), 
    inset 0 1px 0 #ffffff;
}

/* BACK TO HOME PULPIT BUTTON */
.clay-back-btn {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
  border-radius: 9px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff !important;
  transition: all 0.18s ease !important;
}

.clay-back-btn:hover {
  border-color: #3b82f6 !important;
  color: #2563eb !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15) !important;
}

/* RESPONSIVE LAYOUT FOR MOBILE / TABLET */
@media (max-width: 960px) {
  .clay-shapes-grid {
    grid-template-columns: 1fr;
  }
  .clay-l-top-arm {
    grid-column: 1;
    grid-row: auto;
    border-radius: 34px;
    margin-right: 0;
    border-right: 2.5px solid rgba(255, 255, 255, 0.92);
  }
  .clay-l-right-stem {
    grid-column: 1;
    grid-row: auto;
    border-radius: 34px;
  }
  .clay-workers-slab {
    grid-column: 1;
    grid-row: auto;
  }
  .clay-firms-slab {
    grid-column: 1;
    grid-row: auto;
  }
}

/* PENCIL SKETCH THEME START */
@import url('https://fonts.googleapis.com/css2?family=Neucha&family=Caveat:wght@400;700&display=swap');

body {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  background-color: #fdfbf7 !important; /* Pastel off-white/warm color */
  background-image: none !important;
  color: #2c3e50 !important;
}

h1, h2, h3, h4, .modal-title, .comp-title {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
}

.card-section, .company-card-item, .modal-content, .btn, .form-input, .form-select, .data-table {
  border: 2px solid #3b4252 !important;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
  box-shadow: 2px 2px 0px #3b4252 !important;
  background-color: #ffffff !important;
  transition: all 0.2s ease !important;
}

.company-card-item {
  padding-bottom: 1.5rem !important;
}

.btn {
  background-color: #ffffff !important;
  color: #000000 !important;
  font-family: 'Neucha', cursive !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  border: 2px solid #000000 !important;
}

.btn-primary {
  background: repeating-linear-gradient(
    45deg,
    #dcfce7,
    #dcfce7 2px,
    #f0fdf4 2px,
    #f0fdf4 6px
  ) !important; /* light green sketchy */
  color: #0f5132 !important;
  border-color: #166534 !important;
}

.btn-secondary {
  background: repeating-linear-gradient(
    45deg,
    #f8fafc,
    #f8fafc 2px,
    #ffffff 2px,
    #ffffff 6px
  ) !important; /* lightly shaded pencil */
  color: #334155 !important;
  border-color: #94a3b8 !important;
}

.form-select, select {
  color: #000000 !important;
  background: #ffffff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center/16px 12px !important;
  appearance: none !important;
}

#modal-worker-details .modal-footer .btn {
  background: repeating-linear-gradient(
    45deg,
    #e2e8f0,
    #e2e8f0 2px,
    #ffffff 2px,
    #ffffff 6px
  ) !important;
  color: #334155 !important;
  border-color: #475569 !important;
}

.btn-danger {
  background: repeating-linear-gradient(
    45deg,
    #ef4444,
    #ef4444 2px,
    #f87171 2px,
    #f87171 6px
  ) !important; /* sketchy strong red */
  color: #ffffff !important; /* white text */
  border-color: #b91c1c !important;
}

.app-header {
  background: repeating-linear-gradient(
    -45deg,
    rgba(148, 163, 184, 0.2),
    rgba(148, 163, 184, 0.2) 2px,
    transparent 2px,
    transparent 8px
  ) !important;
  border-bottom: 3px solid #3b4252 !important;
  color: #0f172a !important;
}

.app-header .brand, 
.app-header #btn-logout, 
.app-header .user-badge, 
.app-header #header-lang-select {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  font-size: 1.5rem !important;
  color: #000000 !important;
  border: 2px solid #3b4252 !important;
  padding: 0.2rem 0.8rem !important;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
  box-shadow: 2px 2px 0px #3b4252 !important;
  height: 42px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.app-header .brand, 
.app-header #btn-logout, 
.app-header .user-badge {
  background: #ffffff !important;
}
.app-header #header-lang-select {
  background-color: #ffffff !important;
}

.app-header .user-badge .role-tag {
  background: transparent !important;
  color: #000000 !important;
  font-size: 1.2rem !important;
  font-family: 'Neucha', cursive !important;
  border: 1px dashed #3b4252 !important;
}

.company-card-item:hover, .btn:hover {
  transform: translateY(-2px) rotate(-1deg) !important;
  border-radius: 15px 225px 15px 255px/255px 15px 225px 15px !important;
  box-shadow: 4px 4px 0px #3b4252 !important;
}

.company-card-item.selected {
  border-color: #5e81ac !important;
  box-shadow: 4px 4px 0px #5e81ac !important;
  background-color: #eceff4 !important;
}

.badge {
  border: 1px dashed #3b4252 !important;
  background: transparent !important;
  color: #3b4252 !important;
  border-radius: 15px 255px 15px 225px/225px 15px 255px 15px !important;
}

.data-table th, .data-table td {
  border-bottom: 2px solid #3b4252 !important;
  background-color: transparent !important;
}

.data-table th {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  font-size: 1.1rem !important;
  text-transform: uppercase !important;
  text-shadow: none !important;
  color: #1a1a1a !important;
  font-weight: bold !important;
  letter-spacing: 0.5px !important;
}

.sidebar {
  border-right: none !important;
  background: transparent !important;
}

.nav-link {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  font-size: 1.2rem !important;
  border: none !important;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
}
.nav-link:hover, .nav-link.active {
  border: 2px solid #5e81ac !important;
  transform: rotate(-1deg);
  background-color: #eceff4 !important;
}

/* Worker details sketchy style */
#modal-worker-details .modal-title,
.wd-compact-label,
.wd-compact-val {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
}

.wd-compact-row {
  border-bottom: 2px dashed #3b4252 !important;
  margin-bottom: 8px !important;
  padding-bottom: 4px !important;
}
.wd-compact-label {
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  color: #000000 !important;
}
.wd-compact-val {
  font-family: 'Neucha', cursive !important;
  color: #1d4ed8 !important;
  font-weight: bold !important;
  background: transparent !important;
}

.btn-info-small {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  padding: 0 !important;
  cursor: pointer;
}
.btn-info-small:hover {
  color: #3b4252 !important;
  transform: scale(1.1) !important;
}

.period-bar,
:is(#admin-tab-workers, #admin-tab-companies) .period-bar,
.companies-master-detail,
.companies-list-col,
.company-detail-col,
.company-detail-card,
.company-empty-state,
.card-section {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* PENCIL SKETCH THEME END */

/* Historical Mode Background */
body.historical-mode {
  background-color: #e5e5e5 !important;
}

/* Month/Year Selectors Pencil Style */
.clay-pill-select {
  border: 2px solid #3b4252 !important;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
  box-shadow: 2px 2px 0px #3b4252 !important;
  background-color: #ffffff !important;
  height: 42px !important;
  box-sizing: border-box !important;
  font-family: 'Cavolini', 'Architects Daughter', cursive !important;
  font-size: 1.2rem !important;
  color: #000000 !important;
  padding: 0.2rem 2rem 0.2rem 1rem !important;
  transition: all 0.2s ease !important;
}

.clay-pill-select:hover {
  transform: translateY(-2px) rotate(-1deg) !important;
  border-radius: 15px 225px 15px 255px/255px 15px 225px 15px !important;
  box-shadow: 4px 4px 0px #3b4252 !important;
}
