/**
 * Screen-specific Styles - Henson Engineering Timesheet PWA
 * Styles for individual screens that don't fit into components.
 */

/* ============================================================================
   Screen Headers
   ============================================================================ */

.app-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--brand-gold);
  text-align: center;
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.screen-subtitle {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}

.screen-instructions {
  font-size: var(--text-base);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-6) 0 var(--space-3);
}

.section-title:first-child {
  margin-top: 0;
}

/* ============================================================================
   Home Screen
   ============================================================================ */

.home-screen {
  justify-content: center;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

.employee-grid .btn {
  aspect-ratio: 1.5;
  font-size: var(--text-lg);
}

.admin-link-container {
  margin-top: var(--space-8);
  text-align: center;
}

/* ============================================================================
   Employee Menu Screen
   ============================================================================ */

.employee-menu-screen {
  justify-content: center;
}

.employee-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

.employee-menu-screen .btn-back {
  margin-top: var(--space-8);
  align-self: center;
  width: auto;
  min-width: 140px;
}

/* ============================================================================
   Guest Name Screen
   ============================================================================ */

.guest-name-screen {
  justify-content: center;
}

.guest-name-screen .form-group {
  max-width: var(--content-max-width);
  margin: 0 auto var(--space-4);
  width: 100%;
}

.guest-name-screen .button-row {
  max-width: var(--content-max-width);
  margin: var(--space-4) auto 0;
  width: 100%;
}

/* ============================================================================
   Customer Screen
   ============================================================================ */

.customer-screen {
  justify-content: flex-start;
}

.customer-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

.customer-screen .btn-back {
  margin-top: auto;
  align-self: stretch;
}

/* ============================================================================
   Work Type Screen
   ============================================================================ */

.work-type-screen {
  justify-content: center;
}

.work-type-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

.work-type-screen .btn-back {
  margin-top: var(--space-8);
  align-self: center;
  width: auto;
  min-width: 140px;
}

/* ============================================================================
   Project Selection Screen
   ============================================================================ */

.project-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Project Create Screen
   ============================================================================ */

.project-create-screen {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* ============================================================================
   Catalog Selection Screen
   ============================================================================ */

.catalog-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Catalog Entry Screen
   ============================================================================ */

.catalog-entry-screen .entry-info {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
}

.catalog-entry-screen .employee-info {
  color: var(--color-primary);
}

.catalog-entry-screen .customer-info {
  color: var(--color-success);
}

.catalog-entry-screen .item-info {
  color: var(--brand-gold);
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Customer Lookup Screen
   ============================================================================ */

.customer-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Customer Details Screen
   ============================================================================ */

.customer-name {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-success);
  text-align: center;
  margin-bottom: var(--space-4);
}

.details-grid {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-width: 80px;
  flex-shrink: 0;
}

.detail-value {
  font-size: var(--text-base);
  color: var(--text-primary);
  flex: 1;
  white-space: pre-line;
}

/* ============================================================================
   Entry Screen
   ============================================================================ */

.entry-screen .entry-info {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
}

.entry-screen .employee-info {
  color: var(--color-primary);
}

.entry-screen .customer-info {
  color: var(--color-success);
}

.entry-screen .project-info {
  color: var(--brand-gold);
}

.entry-screen .form-textarea {
  flex: 1;
  min-height: 100px;
}

.entry-screen .form-group:has(.form-textarea) {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ============================================================================
   My Logs Screen
   ============================================================================ */

.logs-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Edit Log Screen
   ============================================================================ */

.edit-log-screen .entry-info {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* ============================================================================
   Admin Login Screen
   ============================================================================ */

.admin-login-screen {
  justify-content: center;
  text-align: center;
}

.admin-instructions {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.admin-login-screen .form-group {
  display: flex;
  justify-content: center;
}

.admin-login-screen .button-row {
  max-width: 280px;
  margin: var(--space-4) auto 0;
}

/* ============================================================================
   Admin Menu Screen
   ============================================================================ */

.admin-menu-screen {
  justify-content: flex-start;
}

.admin-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

/* ============================================================================
   Admin To Price Screen
   ============================================================================ */

.filter-row {
  margin-bottom: var(--space-4);
}

.price-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

.price-entry {
  background: var(--bg-surface);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border-default);
  transition: opacity var(--transition-base);
}

.price-entry.priced {
  opacity: 0.5;
}

.price-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.price-entry-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.price-entry-employee {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
}

.price-entry-customer {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-success);
  margin-bottom: var(--space-1);
}

.price-entry-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.price-entry-hours {
  font-size: var(--text-sm);
  color: var(--brand-gold);
  margin-bottom: var(--space-3);
}

.price-entry-amount-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.price-amount-input {
  flex: 1;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.price-amount-input:focus {
  border-color: var(--input-border-focus);
  box-shadow: var(--focus-ring);
  outline: none;
}

.price-entry-status {
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

.price-entry-status.success {
  color: var(--color-success);
}

.price-entry-status.error {
  color: var(--color-danger);
}

/* ============================================================================
   Admin Projects Screen
   ============================================================================ */

.projects-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Admin Project Detail Screen
   ============================================================================ */

.project-detail-info {
  background: var(--bg-surface);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  border: 1px solid var(--border-default);
}

.project-detail-info p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.project-detail-info p:last-child {
  margin-bottom: 0;
}

.project-entries-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

.project-entry-item {
  background: var(--bg-surface);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  border: 1px solid var(--border-default);
}

.project-entry-item .entry-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.project-entry-item .entry-desc {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.project-entry-item .entry-hours {
  font-size: var(--text-sm);
  color: var(--brand-gold);
  margin-top: var(--space-1);
}

/* ============================================================================
   Admin Payroll Screen
   ============================================================================ */

.payroll-instructions {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
}

.batches-list {
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.batch-item {
  background: var(--bg-surface);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  border: 1px solid var(--border-default);
}

.batch-item .batch-date {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--brand-gold);
  margin-bottom: var(--space-1);
}

.batch-item .batch-notes {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.batch-item .batch-processed {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ============================================================================
   Admin Invoice Export Screen
   ============================================================================ */

.export-instructions {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
}

.export-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

.export-customer-section {
  background: var(--bg-surface);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border-default);
}

.export-customer-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-success);
  margin-bottom: var(--space-2);
}

.export-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.export-total {
  color: var(--brand-gold);
  font-weight: var(--font-semibold);
  margin-left: auto;
}

.export-entries {
  max-height: 160px;
  overflow-y: auto;
}

.export-entry {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.export-entry:last-child {
  border-bottom: none;
}

.export-entry-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  min-width: 70px;
}

.export-entry-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex: 1;
}

.export-entry-amount {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--brand-gold);
}

/* ============================================================================
   Admin Merge Screen
   ============================================================================ */

.merge-instructions {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-4);
}

.merge-count {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--brand-gold);
  text-align: center;
  margin-bottom: var(--space-4);
}

.merge-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-4);
}

/* ============================================================================
   Provision Screen
   ============================================================================ */

.provision-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.provision-instructions {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 300px;
}

.provision-screen .form-group {
  width: 100%;
  max-width: 280px;
}

.provision-screen .btn {
  width: 100%;
  max-width: 280px;
  margin-top: var(--space-4);
}

/* ============================================================================
   Closed Screen
   ============================================================================ */

.closed-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-surface-sunken) 0%, var(--bg-app) 100%);
}

.closed-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.closed-icon {
  font-size: 4rem;
  margin: var(--space-4) 0;
}

.closed-message {
  font-size: var(--text-2xl);
  color: var(--text-secondary);
  font-weight: var(--font-normal);
}

.closed-hours {
  font-size: var(--text-base);
  color: var(--text-muted);
}

.closed-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: var(--space-8);
}

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

/* Larger tablets and small desktops */
@media (min-width: 768px) {
  :root {
    --content-max-width: 540px;
  }
  
  .employee-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .employee-grid .btn {
    aspect-ratio: 1.2;
  }
}

/* Landscape on smaller devices */
@media (orientation: landscape) and (max-height: 500px) {
  .screen {
    padding: var(--space-3);
  }
  
  .app-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
  }
  
  .screen-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-3);
  }
  
  .employee-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
  }
  
  .employee-grid .btn {
    aspect-ratio: auto;
    min-height: var(--btn-height);
  }
}

