:root {
    --bg: #203252;
    --text: #f9fafb;
    --muted: #9ca3af;
    --primary: #3b82f6;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.16), transparent 38%),
                radial-gradient(circle at 80% 0%, rgba(245,158,11,0.11), transparent 34%),
                radial-gradient(circle at 50% 60%, rgba(16,185,129,0.09), transparent 38%),
                var(--bg);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text);
    overflow-y: scroll; 
    font-size: 15px;
}

[class*="bg-gray-900"] { background-color: #1d304f; }
[class*="bg-gray-800"] { background-color: #2a3e63; }
[class*="bg-gray-700"] { background-color: #334974; }
[class*="border-gray-700"] { border-color: #435b85; }
[class*="border-gray-600"] { border-color: #4c6994; }

button {
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border-radius: 10px;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
button:active { transform: translateY(0); box-shadow: none; }

input,
textarea,
select {
  color: #e5e7eb;
  font-size: 15px;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

@media (max-width: 768px) {
  .admin-header { display: none !important; }
  .admin-row { display: block !important; }
  .admin-row > span,
  .admin-row > div { width: 100% !important; text-align: left !important; display: block !important; margin-bottom: 6px; }
  .admin-row > span[data-label]::before,
  .admin-row > div[data-label]::before {
      content: attr(data-label);
      display: block;
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.03em;
      margin-bottom: 3px;
  }
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.pill-primary { background: rgba(59,130,246,0.15); color: #bfdbfe; border: 1px solid rgba(59,130,246,0.3); }
.pill-success { background: rgba(16,185,129,0.15); color: #a7f3d0; border: 1px solid rgba(16,185,129,0.3); }
.pill-warn { background: rgba(245,158,11,0.15); color: #fde68a; border: 1px solid rgba(245,158,11,0.3); }
.pill-danger { background: rgba(239,68,68,0.15); color: #fecdd3; border: 1px solid rgba(239,68,68,0.3); }

.table-fancy {
    width: 100%;
    border-collapse: collapse;
    border: none;
    overflow: hidden;
}
.table-fancy thead th {
    position: sticky;
    top: 0;
    background: #0f172a;
    z-index: 1;
    font-size: 13px;
}
.table-fancy th, .table-fancy td {
    padding: 12px;
    border-bottom: 1px solid #1f2937;
}
.table-fancy tbody tr:nth-child(odd) { background: rgba(255,255,255,0.02); }
.table-fancy tbody tr:hover { background: rgba(59,130,246,0.08); }


#app, #nav-tabs, #content-area {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (max-width: 768px) {
    body { font-size: 15px; padding: 0.5rem; }
    #app { padding-left: 0.25rem; padding-right: 0.25rem; }
    #nav-tabs { display: flex !important; flex-wrap: nowrap; gap: 0.25rem; }
    #nav-tabs .mobile-hidden-tab { display: none; }
    #nav-tabs button { padding: 8px 10px; font-size: 14px; flex: 0 0 auto; }
    #nav-more-container { display: block; flex: 0 0 auto; }
    .table-fancy thead { display: none; }
    .table-fancy, .table-fancy tbody, .table-fancy tr, .table-fancy td { display: block; width: 100%; }
    .table-fancy tr { margin-bottom: 12px; border: 1px solid #1f2937; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,0.02); }
    .table-fancy td { border: none; border-bottom: 1px solid #1f2937; padding: 8px 10px; }
    .table-fancy td:last-child { border-bottom: none; }
    .table-fancy td::before {
        content: attr(data-label);
        display: block;
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .project-log-header { display: none; }
    .project-log-row { display: block !important; padding: 10px 0 !important; }
    .project-log-row > span,
    .project-log-row > div { width: 100% !important; text-align: left !important; display: block !important; margin-bottom: 4px; }
    .project-log-row > span[data-label]::before,
    .project-log-row > div[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 2px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .admin-daily-header { display: none; }
    .admin-daily-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
    .admin-daily-row > div,
    .admin-daily-row > span {
        width: 100%;
        text-align: left;
    }
    .admin-daily-row .work-cell {
        width: 100%;
    }
    .admin-daily-row .whitespace-pre-wrap {
        overflow-wrap: anywhere;
    }
    .admin-daily-row > div:last-child {
        justify-content: flex-start;
    }
    button { border-radius: 8px; padding-left: 10px; padding-right: 10px; }
}
input[type="date"] {
    background-color: #374151; color: #fff; padding: 0.5rem;
    border-radius: 0.5rem; border-width: 1px; border-color: #4b5563;
}
.daily-date-display { pointer-events: auto; }
.daily-date-overlay {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(31, 41, 55, 0.9); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}
.todo-completed { text-decoration: line-through; color: #6b7280; }
.leave-entry { background-color: #92400e; border-color: #b45309; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

input[type=number] { -moz-appearance: textfield; appearance: textfield; }
 
input.hours-input { -moz-appearance: textfield; appearance: textfield; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.flash-highlight { box-shadow: 0 0 16px rgba(59, 130, 246, 0.35), 0 0 36px rgba(59, 130, 246, 0.22); background-color: rgba(59, 130, 246, 0.08); transition: box-shadow 0.35s ease, background-color 0.35s ease; }
.flash-highlight-amber { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.85), 0 0 28px rgba(245, 158, 11, 0.65), 0 0 60px rgba(245, 158, 11, 0.45); background-color: rgba(245, 158, 11, 0.22); transition: box-shadow 0.35s ease, background-color 0.35s ease; }
.copy-btn { align-self: center; }


.modal-tab {
    padding: 0.5rem 1rem; cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #9ca3af; 
}
.modal-tab.active {
    border-bottom-color: #60a5fa; 
    color: #f9fafb; 
}


#nav-tabs button {
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.32);
    border: 1px solid rgba(99, 116, 146, 0.28);
    color: #cbd5f5;
    backdrop-filter: blur(6px);
}
#nav-tabs {
    position: relative;
}
#nav-tabs::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0));
}
#nav-tabs button.active-tab {
    border-color: rgba(147, 197, 253, 0.7);
    border-bottom: 3px solid var(--primary);
    color: #eef2ff;
    background: rgba(15, 23, 42, 0.32);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.25);
}
#nav-tabs button {
    position: relative;
}
.tab-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
}

.project-subtab {
    padding: 0.6rem 0.9rem;
    border-radius: 10px 10px 0 0;
    border: 1px solid transparent;
    color: #9ca3af;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.project-subtab.active {
    background: linear-gradient(180deg, rgba(59,130,246,0.2), rgba(59,130,246,0.05));
    border-color: rgba(59,130,246,0.4);
    color: #bfdbfe;
    font-weight: 700;
}


datalist { color: black; } 



@media print {
    @page { size: A4 portrait; margin: 8mm; }
    html, body {
        background: white !important;
        color: black;
        font-size: 10pt;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    #app, #content-area, #print-content { background: white !important; }
    #app, #content-area {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    #app header, #nav-tabs, #modal-container, #loading-state,
    #daily-log-controls button, .edit-delete-buttons, .no-print,
    button[onclick^="delete"], button[onclick^="showEdit"],
    button[onclick^="handleToggle"], button[onclick^="handleAdd"],
    button[onclick^="printDailyLog"],
    #daily-log-slots,
    #daily-log-controls  {
        display: none !important;
    }
      
    .bg-gray-800, .bg-gray-700, .bg-gray-900 { background-color: white !important; border: none !important; box-shadow: none !important; } 
    .border, .border-b, .border-gray-700, .border-gray-600 { border-color: #ddd !important; }
    .text-white, .text-gray-300, .text-gray-400, .text-gray-500,
    .text-blue-300, .text-blue-400, .text-green-300, .text-green-400,

    .text-yellow-300, .text-yellow-400, .text-orange-400, .text-red-500 { color: black !important; }
    .rounded-lg, .rounded-xl, .shadow-lg { border-radius: 0; box-shadow: none; }
    .cursor-pointer { cursor: default; }
    a { text-decoration: none; color: black; }
    .p-4, .p-5, .p-6, .py-2, .px-4, .pb-2 { padding: 0.25rem !important; }
    .mb-4, .mb-6, .mb-8, .space-y-1, .space-y-2, .space-y-3, .space-y-4, .space-y-6, .space-y-8 { margin-bottom: 0.25rem !important; }

     
     #print-content {
         width: 100%;
         display: block;
         margin: 0 !important;
         padding: 0 !important;
         page-break-after: auto !important;
         break-after: auto !important;
     }
     #print-content h1 { font-size: 14pt; margin: 0 0 2px 0; }
     #print-content .meta { font-size: 9pt; color: #333; }
     #print-content .totals { margin-top: 6px; font-size: 10pt; font-weight: 600; }
     #print-content p { font-size: 10pt; }

     
     #print-content table {
         width: 100%;
         border-collapse: collapse;
         margin-top: 0.4rem;
         font-size: 8.2pt;
     }
     #print-content th, #print-content td {
         border: 1px solid #d1d5db;
         padding: 3px 5px;
         text-align: left;
         vertical-align: top; 
     }
     #print-content th {
         background-color: #f3f4f6;
         font-weight: bold;
         padding: 5px 6px;
     }
     #print-content tr.slot-section td {
        background-color: #eef2ff;
        font-weight: 700;
        padding: 4px 6px;
     }
     #print-content .italic { 
        color: #666;
        font-style: italic;
     }
      #print-content .whitespace-pre-wrap { 
        white-space: pre-wrap;
        word-break: break-word; 
     }
     
     #print-content th:last-child,
     #print-content td:last-child:not([colspan]) { 
        text-align: center;
     }
     #print-content .print-daily-table th:nth-child(3),
     #print-content .print-daily-table td:nth-child(3) {
        text-align: center !important;
        vertical-align: middle !important;
        white-space: nowrap;
     }
     #print-content .print-daily-table th:nth-child(4),
     #print-content .print-daily-table td:nth-child(4),
     #print-content .print-daily-table th:nth-child(6),
     #print-content .print-daily-table td:nth-child(6) {
        text-align: center !important;
        vertical-align: middle !important;
     }
     #print-content .print-daily-table th:nth-child(1),
     #print-content .print-daily-table td:nth-child(1) {
        text-align: left !important;
        vertical-align: middle !important;
     }

     .print-daily-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 6px;
     }
     .print-daily-header img { height: 32px; }

     #print-content .print-daily-table {
        page-break-inside: auto;
        break-inside: auto;
     }
     #print-content .print-daily-table thead {
        display: table-header-group;
     }
     #print-content .print-daily-table tfoot {
        display: table-footer-group;
     }
     #print-content .print-daily-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
     }
     #print-content .print-daily-table tr.slot-section {
        break-after: avoid;
        page-break-after: avoid;
     }

      
     #print-content tbody tr.slot-divider td {
        border-bottom: 1px solid #d1d5db;
     }


     .w-full { width: 100%; }
}
 #print-header { display: none; } 
.reg-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  z-index: 50;
  padding: 6px;
}

.reg-suggestions.hidden {
  display: none;
}

.reg-suggestion-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  color: #e5e7eb;
  background: transparent;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.reg-suggestion-item:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #fff;
}

.reg-suggestion-reg {
  font-weight: 600;
  letter-spacing: 0.4px;
}

.reg-suggestion-mm {
  color: #9ca3af;
  font-size: 12px;
}

.admin-daily-header {
  display: grid;
  grid-template-columns: 110px minmax(260px, 1fr) 90px 140px 110px;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  padding: 0 8px 8px;
  border-bottom: 1px solid #374151;
  margin-bottom: 12px;
}

.admin-daily-row {
  display: grid;
  grid-template-columns: 110px minmax(260px, 1fr) 90px 140px 110px;
  gap: 8px;
  font-size: 14px;
  align-items: center;
  line-height: 1.35;
  min-height: 40px;
}

.admin-daily-row > div,
.admin-daily-row > span {
  align-self: center;
}

.admin-daily-row .whitespace-pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-daily-row .reg-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  align-items: flex-start;
}

.admin-daily-row .work-cell {
  display: flex;
  align-items: center;
}

.admin-daily-row > div:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .admin-daily-header {
    display: none;
  }
  .admin-daily-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px;
  }
  .admin-daily-row > div,
  .admin-daily-row > span {
    width: 100%;
    text-align: left;
  }
  .admin-daily-row .work-cell .flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .admin-daily-row .work-cell {
    display: block;
  }
  .admin-daily-row .work-cell .copy-btn {
    align-self: flex-end;
  }
  .admin-daily-row .whitespace-pre-wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .admin-daily-row > div[data-label]::before,
  .admin-daily-row > span[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
  }
  .admin-daily-row > div:last-child {
    justify-content: flex-start;
  }
}
