@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #007A3D;
  --primary-hover: #006030;
  --primary-light: #e8f5e9;
  --secondary: #2e7d32;
  --accent-gold: #F5A623;
  --accent-yellow: #fef08a;
  --dark: #1e293b;
  --gray-dark: #334155;
  --gray: #64748b;
  --gray-light: #f1f5f9;
  --border-color: #cbd5e1;
  --table-border: #94a3b8;
  --sheet-border: #1b5e20;
  --card-bg: #ffffff;
  --body-bg: #f8fafc;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #0284c7;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
}

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

body {
  font-family: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--body-bg);
  color: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--gray); font-size: 0.875rem; }

/* Top notification banner */
.top-notice-bar {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  padding: 8px 16px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.top-notice-bar a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 8px;
  cursor: pointer;
}

/* Navbar */
.app-header {
  background: #ffffff;
  border-bottom: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 900;
}
.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-logo-img {
  height: 48px;
  max-width: 170px;
  object-fit: contain;
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.brand-subtitle {
  font-size: 0.78rem;
  color: var(--gray);
  font-weight: 500;
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.user-role-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--dark);
}
.btn-outline:hover {
  background: var(--gray-light);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 1.1rem;
}

/* Nav Tabs */
.app-tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-light);
  padding: 4px;
  border-radius: 10px;
  margin: 16px 0;
  overflow-x: auto;
}
.tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-dark);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary);
}
.tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   THE OFFICIAL DAILY REPORT SHEET STYLING (MATCHES WORD DOCUMENT EXACTLY)
   ========================================================================== */
.sheet-container {
  background: #ffffff;
  border: 2px solid var(--sheet-border);
  box-shadow: var(--shadow-lg);
  margin: 20px auto;
  padding: 24px;
  max-width: 1000px;
  border-radius: 4px;
  color: #111827;
}

/* Header Box */
.sheet-header-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.sheet-header-table td, .sheet-header-table th {
  border: 1.5px solid var(--sheet-border);
  padding: 8px 12px;
  vertical-align: middle;
}
.sheet-logo-cell {
  width: 35%;
  text-align: center;
  background: #ffffff;
  padding: 10px;
}
.sheet-logo-cell img {
  max-height: 80px;
  max-width: 100%;
}
.sheet-title-cell {
  width: 65%;
  text-align: center;
  background: #f0fdf4;
}
.sheet-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
}
.sheet-en-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #166534;
  margin-top: 2px;
  letter-spacing: 1px;
}
.sheet-sub-title {
  font-size: 0.95rem;
  color: var(--gray-dark);
  font-weight: 600;
  margin-top: 4px;
}

/* Meta Info Table (Date, Day, Arrival, Departure, Name, ID) */
.sheet-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.sheet-meta-table td, .sheet-meta-table th {
  border: 1.5px solid var(--sheet-border);
  padding: 8px 10px;
  font-size: 0.95rem;
  vertical-align: middle;
}
.meta-label {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  width: 18%;
  white-space: nowrap;
}
.meta-input-td {
  width: 32%;
}

/* Section Title Bars */
.sheet-section-banner {
  background: var(--primary);
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 700;
  padding: 8px 12px;
  border: 1.5px solid var(--sheet-border);
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet-section-banner .en-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.95;
}

/* Form Tables */
.sheet-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.92rem;
}
.sheet-data-table th, .sheet-data-table td {
  border: 1.5px solid var(--sheet-border);
  padding: 6px 8px;
  vertical-align: middle;
}
.sheet-data-table th {
  background: #e2e8f0;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}
.sheet-data-table tr.break-row {
  background: #fef3c7;
  font-weight: 600;
}
.sheet-data-table tr.break-row td {
  text-align: center;
  color: #92400e;
}
.sheet-data-table tr:hover:not(.break-row) {
  background-color: #f8fafc;
}

/* Inputs inside Sheet */
.sheet-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 4px 6px;
  color: #0f172a;
  transition: all 0.2s;
}
.sheet-input:focus, .sheet-input:hover {
  background: #ffffff;
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 122, 61, 0.15);
  border-radius: 4px;
}
.sheet-input[readonly], .sheet-input[disabled] {
  background: #f8fafc;
  cursor: not-allowed;
  color: #475569;
}
.sheet-number-input {
  text-align: right;
  font-weight: 600;
}

/* Custom Checkbox */
.sheet-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  border: 2px solid var(--primary);
}

/* EOD Grid */
.eod-label-cell {
  background: #f8fafc;
  font-weight: 600;
  width: 32%;
}
.eod-val-cell {
  width: 18%;
}

/* Totals Row */
.total-row {
  background: #f0fdf4 !important;
  font-weight: 700;
  font-size: 0.95rem;
}
.total-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
}

/* Signature Section */
.signature-box {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 6px;
}
.signature-line {
  border-top: 1px dashed #64748b;
  width: 80%;
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.signature-img {
  max-height: 45px;
  object-fit: contain;
}

/* Action Floating Bar / Sticky Footer */
.sheet-submit-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 2px solid var(--primary);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
  z-index: 50;
  border-radius: 8px 8px 0 0;
  margin-top: 20px;
}

/* Modal Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--primary-light);
  border-radius: 12px 12px 0 0;
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
  line-height: 1;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 61, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* Dashboard Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.metric-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.metric-info h4 {
  font-size: 0.82rem;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
}
.metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

/* Table in Admin View */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.custom-table th, .custom-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}
.custom-table th {
  background: #f8fafc;
  color: var(--gray-dark);
  font-weight: 700;
}
.custom-table tr:hover {
  background: #f1f5f9;
}

/* Signature Canvas */
#signatureCanvas {
  border: 1px dashed var(--sheet-border);
  background: #fff;
  border-radius: 4px;
  cursor: crosshair;
  width: 100%;
  height: 120px;
}

/* Login Card Styling */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.auth-header {
  text-align: center;
  padding: 30px 24px 16px;
  background: #ffffff;
}
.auth-logo {
  max-height: 75px;
  margin-bottom: 12px;
}
.auth-body {
  padding: 24px;
}

/* Locked status notice */
.lock-banner {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #065f46;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   PRINT MEDIA STYLING (A4 SHEET PRINT-PERFECT)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }
  .app-header,
  .top-notice-bar,
  .app-tabs,
  .sheet-submit-bar,
  .modal-overlay,
  .no-print {
    display: none !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .sheet-container {
    box-shadow: none !important;
    border: 1.5px solid #000000 !important;
    padding: 8px !important;
    margin: 0 !important;
    max-width: 100% !important;
    page-break-after: avoid;
  }
  .sheet-header-table td,
  .sheet-meta-table td,
  .sheet-meta-table th,
  .sheet-data-table th,
  .sheet-data-table td {
    border: 1px solid #000000 !important;
  }
  .sheet-section-banner {
    background: #e2e8f0 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  .sheet-input {
    border: none !important;
    padding: 0 !important;
  }
  .total-row {
    background: #f1f5f9 !important;
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .sheet-container {
    padding: 12px;
    border-width: 1px;
  }
  .sheet-main-title {
    font-size: 1.15rem;
  }
  .sheet-en-title {
    font-size: 0.9rem;
  }
  .sheet-header-table, .sheet-meta-table {
    display: block;
    overflow-x: auto;
  }
  .sheet-data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .sheet-data-table td .sheet-input {
    min-width: 100px;
  }
  .meta-label {
    width: 25%;
  }
}
