/* OES HR Content Dashboard — Brand-aligned styles */

:root {
  --navy: #1B3A5C;
  --teal: #2E7D8C;
  --teal-light: #E8F4F6;
  --bg: #F4F6F8;
  --white: #FFFFFF;
  --grey-50: #F9FAFB;
  --grey-100: #F3F4F6;
  --grey-200: #E5E7EB;
  --grey-400: #9CA3AF;
  --grey-600: #6B7280;
  --grey-800: #374151;
  --green: #059669;
  --green-light: #D1FAE5;
  --red: #DC2626;
  --red-light: #FEE2E2;
  --amber: #D97706;
  --amber-light: #FEF3C7;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--grey-800);
  line-height: 1.5;
  font-size: 14px;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.app-header {
  background: var(--navy);
  color: var(--white);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header .brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.app-header .brand span {
  color: var(--teal);
  font-weight: 400;
  margin-left: 8px;
}

.app-header nav {
  display: flex;
  gap: 4px;
}

.app-header nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.app-header nav a:hover,
.app-header nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

.card-meta {
  font-size: 12px;
  color: var(--grey-400);
  margin-top: 4px;
}

/* ── Status badges ─────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending { background: var(--amber-light); color: var(--amber); }
.badge-approved { background: var(--green-light); color: var(--green); }
.badge-rejected { background: var(--red-light); color: var(--red); }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: #257069; }

.btn-approve { background: var(--green); color: var(--white); }
.btn-approve:hover { background: #047857; }

.btn-reject { background: var(--red-light); color: var(--red); }
.btn-reject:hover { background: #FECACA; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--grey-200);
  color: var(--grey-600);
}
.btn-outline:hover { background: var(--grey-50); }

.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-600);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--grey-800);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 125, 140, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── Content sections ──────────────────────────────────────────────────── */

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teal);
  margin: 24px 0 12px;
}

.slide-card {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 10px;
}

.slide-number {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.slide-headline {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.slide-body {
  font-size: 13px;
  color: var(--grey-800);
  line-height: 1.6;
}

.word-count {
  font-size: 11px;
  margin-top: 4px;
}

.word-count.over { color: var(--red); }
.word-count.ok { color: var(--green); }

/* ── Video brief table ─────────────────────────────────────────────────── */

.brief-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}

.brief-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brief-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: top;
}

.brief-table tr:nth-child(even) td {
  background: var(--grey-50);
}

/* ── Caption cards ─────────────────────────────────────────────────────── */

.caption-card {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 10px;
}

.caption-platform {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--grey-400);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.caption-text {
  font-size: 13px;
  color: var(--grey-800);
  white-space: pre-wrap;
  line-height: 1.7;
}

.caption-stats {
  font-size: 11px;
  color: var(--grey-400);
  margin-top: 6px;
}

/* ── Editable fields ───────────────────────────────────────────────────── */

.editable {
  cursor: text;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: all 0.15s;
}

.editable:hover {
  border-color: var(--grey-200);
  background: var(--white);
}

.editable:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46, 125, 140, 0.1);
}

.editable.modified {
  border-color: var(--amber);
  background: var(--amber-light);
}

/* ── Alerts ────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}

.alert-info { background: var(--teal-light); color: var(--navy); }
.alert-success { background: var(--green-light); color: #065F46; }
.alert-error { background: var(--red-light); color: #991B1B; }
.alert-warning { background: var(--amber-light); color: #92400E; }

/* ── Empty state ───────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-400);
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ── Login page ────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}

.login-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--grey-400);
  text-align: center;
  margin-bottom: 28px;
}

/* ── Action bar ────────────────────────────────────────────────────────── */

.action-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--grey-200);
  margin-top: 24px;
}

.action-bar .spacer { flex: 1; }

/* ── Source data ───────────────────────────────────────────────────────── */

.source-panel {
  background: var(--teal-light);
  border: 1px solid rgba(46, 125, 140, 0.2);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
}

.source-panel .source-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teal);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.source-panel .source-value {
  font-size: 13px;
  color: var(--grey-800);
  line-height: 1.6;
}

/* ── Production rules box ──────────────────────────────────────────────── */

.production-rules {
  background: var(--grey-100);
  border-left: 4px solid var(--navy);
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--grey-600);
  line-height: 1.7;
}

/* ── Toast notifications ───────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: var(--green); color: var(--white); }
.toast-error { background: var(--red); color: var(--white); }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .container { padding: 16px; }
  .app-header { padding: 0 16px; }
  .app-header nav { gap: 0; }
  .app-header nav a { padding: 8px 8px; font-size: 12px; }
  .action-bar { flex-wrap: wrap; }
}
