/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f3f4f6; color: #1f2937; line-height: 1.5; }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; background: #1e3a5f; color: white; padding: 12px 24px; }
.nav-brand { font-size: 16px; }
.nav-separator { color: #93c5fd; margin: 0 6px; }
.nav-links { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.nav-links a { color: #93c5fd; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-user { color: #d1d5db; }
.nav-logout { color: #fca5a5 !important; }

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

/* Dashboard */
.dashboard-header { margin-bottom: 20px; }
.dashboard-header h1 { font-size: 22px; margin-bottom: 12px; }
.dashboard-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Inputs */
.input-date, .input-search, .input-text, .input-select {
  padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px;
  background: white;
}
.input-search { min-width: 300px; }

/* Buttons */
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 14px; text-decoration: none; border: none; cursor: pointer; }
.btn-primary { background: #1e3a5f; color: white; }
.btn-primary:hover { background: #2d4a6f; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-google { background: #4285f4; color: white; padding: 12px 24px; font-size: 16px; display: inline-block; margin-top: 16px; }
.btn-google:hover { background: #3367d6; }
.btn-back { margin-bottom: 12px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.data-table th { background: #1e3a5f; color: white; padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 600; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.data-table tbody tr:hover { background: #f0f4ff; }
.text-center { text-align: center; }

/* Clickable Rows */
.clickable-row { cursor: pointer; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #e5e7eb; }
.badge-quote { background: #dbeafe; color: #1e40af; }
.badge-order { background: #d1fae5; color: #065f46; }
.badge-admin { background: #fce7f3; color: #9d174d; }
.badge-manager { background: #fef3c7; color: #92400e; }
.badge-user { background: #e0e7ff; color: #3730a3; }

/* Status */
.status-ok { color: #059669; font-weight: 600; }
.status-error { color: #dc2626; font-weight: 600; }

/* Cards */
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.card h3 { margin-bottom: 12px; font-size: 16px; }

/* Forms */
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Alerts */
.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Login */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #1e3a5f; }
.login-card { background: white; padding: 40px; border-radius: 12px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.login-title { color: #1e3a5f; font-size: 28px; margin-bottom: 4px; }
.login-subtitle { color: #6b7280; font-size: 18px; font-weight: 400; margin-bottom: 16px; }
.login-desc { color: #9ca3af; font-size: 14px; margin-bottom: 8px; }

/* Detail Page */
.detail-header { margin-bottom: 20px; }
.detail-header h1 { font-size: 22px; margin-bottom: 8px; }
.detail-meta { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #6b7280; }
.detail-meta strong { color: #374151; }

/* Source Files */
.source-files-section { margin-bottom: 20px; display: flex; gap: 20px; flex-wrap: wrap; }
.source-files-group { flex: 1; min-width: 280px; }
.files-heading { font-size: 14px; font-weight: 700; margin-bottom: 8px; padding: 6px 12px; border-radius: 4px; }
.files-heading-output { background: #dbeafe; color: #1e40af; }
.files-heading-input { background: #f3e8ff; color: #6b21a8; }
.file-list { display: flex; gap: 10px; flex-wrap: wrap; }
.file-link { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: white; border: 1px solid #d1d5db; border-radius: 6px; text-decoration: none; color: #1f2937; font-size: 13px; transition: all 0.15s; }
.file-link:hover { background: #f0f4ff; border-color: #6366f1; }
.file-link-output { border-left: 3px solid #3b82f6; }
.file-link-input { border-left: 3px solid #8b5cf6; }
.file-icon { font-size: 18px; }
.file-badge { font-size: 10px; background: #f3e8ff; color: #6b21a8; padding: 1px 6px; border-radius: 8px; font-weight: 600; }

/* Report Container */
.report-container { background: white; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Empty State */
.empty-state { text-align: center; color: #9ca3af; padding: 40px; font-size: 16px; }

/* Error Page */
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 24px; margin-bottom: 12px; }
.error-page p { color: #6b7280; margin-bottom: 20px; }

/* Text */
.text-muted { color: #9ca3af; font-size: 13px; }
