﻿/* Copied unchanged from the GAS app (gas-original/Index.html lines 9-616). */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .container {
      background: white;
      border-radius: 12px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
      max-width: 600px;
      width: 100%;
      overflow: hidden;
    }

    .header {
      background: linear-gradient(135deg, #2d5016 0%, #4a7c2c 100%);
      color: white;
      padding: 30px;
      text-align: center;
      border-bottom: 4px solid #1b3a0f;
    }

    .header h1 {
      font-size: 24px;
      margin-bottom: 8px;
      font-weight: 600;
    }

    .header h2 {
      font-size: 18px;
      margin-bottom: 5px;
      font-weight: 500;
    }

    .header p {
      font-size: 13px;
      opacity: 0.95;
      margin: 3px 0;
    }

    .clock-section {
      background: #f1f8f4;
      padding: 25px;
      text-align: center;
      border-bottom: 2px solid #c8e6c9;
    }

    .current-date {
      font-size: 18px;
      font-weight: 600;
      color: #4a7c2c;
      margin-bottom: 6px;
      letter-spacing: 0.5px;
    }

    .current-time {
      font-size: 56px;
      font-weight: bold;
      color: #2d5016;
      font-family: 'Courier New', monospace;
      margin-bottom: 10px;
    }

    .content {
      padding: 40px;
    }

    .input-group {
      margin-bottom: 25px;
    }

    .input-group label {
      display: block;
      margin-bottom: 8px;
      color: #2d5016;
      font-weight: 600;
      font-size: 14px;
    }

    .input-group input,
    .input-group select {
      width: 100%;
      padding: 14px;
      border: 2px solid #c8e6c9;
      border-radius: 8px;
      font-size: 16px;
      transition: all 0.3s;
      font-weight: 500;
      background: #fff;
    }

    .input-group input:focus,
    .input-group select:focus {
      outline: none;
      border-color: #4a7c2c;
      box-shadow: 0 0 0 3px rgba(74, 124, 44, 0.1);
    }

    .button-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px;
      margin-bottom: 25px;
    }

    .btn {
      padding: 16px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* ===== The four punches of the day ===== */
    .punch-group {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
      margin-bottom: 16px;
    }

    .punch-card {
      position: relative;
      padding: 14px 6px 10px;
      border: none;
      border-radius: 10px;
      color: white;
      cursor: pointer;
      text-align: center;
      font-family: inherit;
      transition: all 0.25s;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    }

    .punch-card:hover:not(:disabled) {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    }

    .punch-step {
      position: absolute;
      top: 5px;
      left: 7px;
      font-size: 10px;
      font-weight: 700;
      opacity: 0.65;
    }

    .punch-icon {
      display: block;
      font-size: 18px;
      line-height: 1;
      margin-bottom: 4px;
    }

    .punch-label {
      display: block;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.2px;
      white-space: nowrap;
    }

    .punch-time {
      display: block;
      margin-top: 3px;
      font-size: 11px;
      font-weight: 600;
      font-family: 'Courier New', monospace;
      opacity: 0.85;
    }

    .punch-login   { background: linear-gradient(135deg, #4a7c2c 0%, #6aab41 100%); }
    .punch-breakout{ background: linear-gradient(135deg, #b3730f 0%, #d99414 100%); }
    .punch-breakin { background: linear-gradient(135deg, #1c6e6a 0%, #2a9d95 100%); }
    .punch-logout  { background: linear-gradient(135deg, #2d5016 0%, #3d6624 100%); }

    .punch-card:disabled { cursor: not-allowed; }

    /* Already punched today — kept visible, but no longer actionable. */
    .punch-card.done {
      cursor: default;
      filter: grayscale(0.35);
      opacity: 0.75;
    }

    .punch-card.done::after {
      content: '✓';
      position: absolute;
      top: 5px;
      right: 7px;
      font-size: 11px;
      font-weight: 700;
    }

    .punch-progress {
      text-align: center;
      font-size: 13px;
      font-weight: 600;
      color: #2d5016;
      margin-bottom: 25px;
    }

    .btn-print {
      background: linear-gradient(135deg, #424242 0%, #616161 100%);
      color: white;
    }

    .btn-print:hover {
      background: linear-gradient(135deg, #303030 0%, #424242 100%);
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(66, 66, 66, 0.3);
    }

    /* Secondary print action: full row under Date / Project / PRINT */
    .btn-print-blank {
      grid-column: 1 / -1;
      padding: 12px;
      font-size: 14px;
      background: #fff;
      color: #424242;
      border: 2px dashed #9e9e9e;
    }

    .btn-print-blank:hover {
      background: #f5f5f5;
      border-color: #616161;
    }

    /* One signatory in the Projects form: Label | Name | Title | ✕ */
    .sig-row {
      display: grid;
      grid-template-columns: 1fr 1.4fr 1.4fr auto;
      gap: 8px;
      align-items: end;
      margin-bottom: 8px;
    }

    @media (max-width: 600px) {
      .sig-row { grid-template-columns: 1fr; }
    }

    .btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none !important;
    }

    .message {
      padding: 15px;
      border-radius: 8px;
      margin-top: 20px;
      font-weight: 500;
      display: none;
      animation: slideIn 0.3s ease;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .message.success {
      background: #d4edda;
      color: #155724;
      border: 2px solid #c3e6cb;
    }

    .message.error {
      background: #f8d7da;
      color: #721c24;
      border: 2px solid #f5c6cb;
    }

    .employee-info {
      background: #f1f8f4;
      padding: 15px;
      border-radius: 8px;
      margin-top: 15px;
      display: none;
      border-left: 4px solid #4a7c2c;
    }

    .employee-info p {
      margin: 5px 0;
      color: #2d5016;
      font-weight: 500;
    }


    .divider {
      height: 2px;
      background: linear-gradient(to right, transparent, #c8e6c9, transparent);
      margin: 25px 0;
    }

    .print-section {
      display: grid;
      grid-template-columns: 1fr 1fr auto;
      gap: 15px;
      align-items: end;
    }

    .print-section .input-group {
      margin-bottom: 0;
    }

    .print-section input[type="date"] {
      text-align: center;
      cursor: pointer;
    }

    /* "Include in printout" checklist under the PRINT row */
    .print-people {
      margin-top: 15px;
      border: 1px solid #c8e6c9;
      border-radius: 8px;
      padding: 12px 14px;
      background: #f9fcf8;
    }

    .print-people-group {
      margin-top: 8px;
    }

    .print-people-title {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 600;
      color: #2d5016;
      margin-bottom: 6px;
    }

    .print-people-title a {
      font-weight: normal;
      font-size: 12px;
      color: #2d5016;
      cursor: pointer;
      text-decoration: underline;
    }

    .print-people-items {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 4px 12px;
    }

    .print-people-items label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      cursor: pointer;
    }

    .print-people-items small {
      color: #777;
    }

    .print-people-note {
      font-size: 13px;
      color: #777;
    }

    @media (max-width: 600px) {
      .current-time {
        font-size: 42px;
      }

      .button-group {
        grid-template-columns: 1fr;
      }

      /* Four across gets too tight on a phone — fall back to 2 x 2. */
      .punch-group {
        grid-template-columns: 1fr 1fr;
      }

      .print-section {
        grid-template-columns: 1fr;
      }

      .print-section .btn-print {
        width: 100%;
      }
    }

    /* ===== Admin panel ===== */
    .admin-fab {
      position: fixed;
      top: 16px;
      right: 16px;
      z-index: 900;
      background: #2d5016;
      color: #fff;
      border: none;
      padding: 10px 18px;
      border-radius: 24px;
      font-weight: 600;
      font-size: 13px;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
      display: none;
    }

    .admin-fab:hover { background: #1b3a0f; }

    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      display: none;
      z-index: 1000;
      padding: 20px;
      overflow: auto;
    }

    .modal-overlay.open {
      display: flex;
      align-items: flex-start;
      justify-content: center;
    }

    .modal {
      background: #fff;
      border-radius: 12px;
      max-width: 860px;
      width: 100%;
      margin: 20px auto;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    }

    .modal-header {
      background: linear-gradient(135deg, #2d5016 0%, #4a7c2c 100%);
      color: #fff;
      padding: 18px 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-header h2 { font-size: 18px; font-weight: 600; }

    .modal-close {
      background: transparent;
      border: none;
      color: #fff;
      font-size: 26px;
      cursor: pointer;
      line-height: 1;
    }

    .tabs {
      display: flex;
      border-bottom: 2px solid #c8e6c9;
      background: #f1f8f4;
    }

    .tab {
      flex: 1;
      padding: 14px 8px;
      text-align: center;
      cursor: pointer;
      font-weight: 600;
      color: #4a7c2c;
      border: none;
      background: transparent;
      font-size: 13px;
    }

    .tab.active {
      background: #fff;
      color: #2d5016;
      border-bottom: 3px solid #4a7c2c;
    }

    .tab-panel {
      display: none;
      padding: 24px;
      max-height: 65vh;
      overflow: auto;
    }

    .tab-panel.active { display: block; }

    .section-title {
      font-size: 14px;
      font-weight: 700;
      color: #2d5016;
      margin: 4px 0 12px;
    }

    .admin-form {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 22px;
    }

    .admin-form .full { grid-column: 1 / -1; }

    .admin-form label {
      display: block;
      font-size: 12px;
      color: #2d5016;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .admin-form input,
    .admin-form select {
      width: 100%;
      padding: 10px;
      border: 2px solid #c8e6c9;
      border-radius: 6px;
      font-size: 14px;
    }

    .admin-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .mini-select {
      max-width: 180px;
      padding: 4px 6px;
      border: 1px solid #c8e6c9;
      border-radius: 4px;
      font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
      padding: 8px 10px;
      border-bottom: 1px solid #e0e0e0;
      text-align: left;
    }

    .admin-table th {
      background: #f1f8f4;
      color: #2d5016;
      position: sticky;
      top: 0;
    }

    .badge {
      padding: 3px 9px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 600;
    }

    .badge.active { background: #d4edda; color: #155724; }
    .badge.inactive { background: #f8d7da; color: #721c24; }

    .mini-btn {
      padding: 6px 12px;
      border: none;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      color: #fff;
    }

    .mini-btn.deact { background: #c0392b; }
    .mini-btn.act { background: #4a7c2c; }
    .mini-btn:disabled { background: #9e9e9e; opacity: 0.65; cursor: not-allowed; pointer-events: none; }

    .admin-msg {
      padding: 10px 12px;
      border-radius: 6px;
      margin-bottom: 14px;
      font-size: 13px;
      display: none;
    }

    .admin-msg.success { background: #d4edda; color: #155724; }
    .admin-msg.error { background: #f8d7da; color: #721c24; }

    @media (max-width: 600px) {
      .admin-form { grid-template-columns: 1fr; }
    }
