* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f3f4f6; color: #111827; }
.hidden { display: none !important; }

.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 100%); }
.login-card { background: #fff; border-radius: 12px; padding: 40px 36px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: center; }
.login-title { font-size: 22px; font-weight: 700; color: #1e3a5f; margin-bottom: 28px; }
.login-card input { width: 100%; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; margin-bottom: 16px; outline: none; transition: border .2s; }
.login-card input:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,.15); }
.login-card button { width: 100%; padding: 12px; background: #1a56db; color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.login-card button:hover { background: #1544b8; }
.login-error { color: #dc2626; font-size: 13px; margin-top: 12px; }

.dash-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; background: #1e3a5f; color: #fff; }
.dash-header h1 { font-size: 18px; font-weight: 700; }
.dash-header-right { display: flex; align-items: center; gap: 16px; }
.header-link { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; transition: color .2s; }
.header-link:hover { color: #fff; }
.btn-logout { background: rgba(255,255,255,.15); color: #fff; border: none; padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: background .2s; }
.btn-logout:hover { background: rgba(255,255,255,.25); }

.dash-tabs { display: flex; gap: 0; padding: 0 32px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.tab-btn { padding: 14px 24px; border: none; background: none; font-size: 14px; font-weight: 600; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; }
.tab-btn.active { color: #1a56db; border-bottom-color: #1a56db; }
.tab-btn:hover { color: #111827; }

.tab-content { display: none; padding: 24px 32px; }
.tab-content.active { display: block; }
.tab-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.tab-header h2 { font-size: 18px; font-weight: 700; }
.count-badge { background: #e5e7eb; color: #374151; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.data-table th { text-align: left; padding: 12px 16px; background: #f9fafb; font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #e5e7eb; }
.data-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table tr:hover td { background: #f9fafb; }
.data-table tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-orange { background: #fed7aa; color: #9a3412; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

.btn-view { padding: 6px 14px; background: #1a56db; color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s; }
.btn-view:hover { background: #1544b8; }
.btn-link { padding: 6px 14px; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .2s; }
.btn-link:hover { background: #e5e7eb; }

.stat-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px 20px; min-width: 140px; flex: 1; }
.stat-label { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 700; color: #111827; }
.stat-value.blue { color: #1a56db; }
.stat-value.green { color: #059669; }

.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: #374151; }

.view-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f9fafb; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.view-row .view-meta { color: #6b7280; flex: 1; }
.view-row .view-duration { font-weight: 600; color: #111827; }

.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-content { position: relative; background: #fff; border-radius: 12px; width: 90%; max-width: 800px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; background: #fff; border-radius: 12px 12px 0 0; z-index: 1; }
.modal-header h2 { font-size: 18px; font-weight: 700; }
.btn-close { background: none; border: none; font-size: 24px; color: #6b7280; cursor: pointer; line-height: 1; }
.btn-close:hover { color: #111827; }
.modal-body { padding: 24px; }

.empty-state { text-align: center; padding: 48px 24px; color: #9ca3af; font-size: 14px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-group input, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; outline: none; transition: border .2s; }
.form-group input:focus, .form-group select:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,.15); }

@media (max-width: 768px) {
  .tab-content { padding: 16px; }
  .dash-header { padding: 12px 16px; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 10px; }
  .stat-row { flex-direction: column; }
  .modal-content { width: 95%; max-height: 90vh; }
}
