/* === SURETYSYNC — Dashboard styles === */

/* === PAGE LAYOUT === */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* === ALERT BANNER === */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.alert-icon { font-size: 20px; }

.alert-content {
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}

/* === STATS BAR === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-active .stat-num { color: #059669; }
.stat-warning .stat-num { color: #d97706; }
.stat-expired .stat-num { color: #dc2626; }

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.filter-select {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  cursor: pointer;
}

/* === DOCUMENTS TABLE === */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.docs-table th {
  background: #f8f9fb;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.docs-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #111827;
  vertical-align: middle;
}

.docs-table tr:last-child td { border-bottom: none; }
.docs-table tr:hover td { background: #fafafa; }

.doc-name-link {
  font-weight: 600;
  color: #111827;
}
.doc-name-link:hover { color: #1d4ed8; }

.doc-type-tag {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
}

.doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* === BADGES === */
.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
}

.badge-active {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-expiring {
  background: #fed7aa;
  color: #9a3412;
}

.badge-expired {
  background: #fee2e2;
  color: #991b1b;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.15s;
}
.btn-primary:hover { background: #2563eb; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: #f9fafb; color: #111827; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.15s;
}
.btn-danger:hover { background: #fef2f2; }

.btn-sm {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-sm:hover { background: #e5e7eb; color: #111827; }
.btn-sm-view { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.btn-sm-view:hover { background: #dbeafe; }
.btn-sm-danger { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.btn-sm-danger:hover { background: #fee2e2; }

/* === EMPTY STATE === */
.docs-empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 60px 24px;
  text-align: center;
  color: #6b7280;
  font-size: 15px;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.modal-close:hover { color: #374151; }

/* === FORMS === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #111827;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.success-msg {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* === DETAIL VIEW === */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.detail-card {
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  gap: 24px;
}

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

.detail-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  padding-top: 2px;
}

.detail-value {
  font-size: 15px;
  color: #111827;
  text-align: right;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

@media (max-width: 700px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-actions { flex-direction: row; flex-wrap: wrap; }
}