/* =============================================
   AGENCYOS — GLOBAL STYLES
   Theme: Industrial Precision meets Editorial
   Palette: Deep navy, electric orange, sharp teal
   ============================================= */

:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #111318;
  --bg-tertiary: #181b22;
  --bg-panel: #13151c;
  --bg-hover: #1e2130;

  --text-primary: #e8eaf0;
  --text-secondary: #8890a8;
  --text-muted: #555e75;
  --text-accent: #ff6b2b;

  --accent-orange: #ff6b2b;
  --accent-teal: #00d4aa;
  --accent-purple: #9b59ff;
  --accent-blue: #3d8bff;
  --accent-green: #2ecc71;
  --accent-red: #ff4757;
  --accent-yellow: #ffd32a;

  --border: #1e2233;
  --border-light: #262c3d;

  --sidebar-width: 260px;
  --topbar-height: 68px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #f0f2f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fc;
  --bg-panel: #ffffff;
  --bg-hover: #f0f2f7;
  --text-primary: #111318;
  --text-secondary: #4a5068;
  --text-muted: #8890a8;
  --border: #e0e4ef;
  --border-light: #eaecf4;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* ===== APP SHELL ===== */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 100;
}

.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-tag,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .search-input,
.sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .sidebar-search { padding: 12px 14px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 22px;
  color: var(--accent-orange);
  line-height: 1;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.sidebar-toggle {
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

.sidebar-search {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 32px;
  color: var(--text-primary);
  font-size: 13px;
  transition: var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  background: var(--bg-hover);
}
.search-input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-section {
  padding: 16px 0 4px;
}

.nav-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 18px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 400;
  transition: var(--transition);
  border-radius: 0;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(255,107,43,0.12) 0%, transparent 100%);
  color: var(--accent-orange);
  border-right: 2px solid var(--accent-orange);
}

.nav-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text { flex: 1; }

.nav-badge {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.nav-badge.urgent {
  background: rgba(255,71,87,0.15);
  color: var(--accent-red);
  border-color: rgba(255,71,87,0.3);
}

.nav-tag.new {
  background: rgba(155,89,255,0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(155,89,255,0.3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-orange), #ff9500);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }
.user-menu-btn { color: var(--text-muted); font-size: 18px; padding: 4px; }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 12px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent-orange);
  color: white;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  letter-spacing: 0.2px;
}
.btn-primary:hover {
  background: #ff8040;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,43,0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-icon {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.btn-icon:hover { background: var(--accent-orange); color: white; border-color: transparent; }

.btn-approve {
  background: rgba(46,204,113,0.15);
  color: var(--accent-green);
  border: 1px solid rgba(46,204,113,0.3);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  transition: var(--transition);
}
.btn-approve:hover { background: var(--accent-green); color: white; }

.btn-reject {
  background: rgba(255,71,87,0.1);
  color: var(--accent-red);
  border: 1px solid rgba(255,71,87,0.2);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  transition: var(--transition);
}
.btn-reject:hover { background: var(--accent-red); color: white; }

/* ===== PANELS ===== */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.panel-actions { display: flex; align-items: center; gap: 10px; }

.panel-link {
  font-size: 12px;
  color: var(--accent-orange);
  font-weight: 500;
  transition: var(--transition);
}
.panel-link:hover { opacity: 0.7; }

.panel-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ===== TAGS ===== */
.tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}
.tag-design { background: rgba(155,89,255,0.15); color: #b07aff; border: 1px solid rgba(155,89,255,0.25); }
.tag-content { background: rgba(61,139,255,0.15); color: #6ba3ff; border: 1px solid rgba(61,139,255,0.25); }
.tag-performance { background: rgba(0,212,170,0.15); color: #00d4aa; border: 1px solid rgba(0,212,170,0.25); }
.tag-video { background: rgba(255,107,43,0.15); color: #ff8a5e; border: 1px solid rgba(255,107,43,0.25); }
.tag-overdue { background: rgba(255,71,87,0.15); color: #ff6b75; border: 1px solid rgba(255,71,87,0.25); }
.tag-review { background: rgba(255,211,42,0.15); color: #ffc020; border: 1px solid rgba(255,211,42,0.25); }
.tag-pending { background: rgba(136,144,168,0.15); color: #8890a8; border: 1px solid rgba(136,144,168,0.2); }
.tag-approved { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.25); }

/* ===== NOTIFICATION ===== */
.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.notification-bell:hover { background: var(--bg-hover); }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--accent-red);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.notif-panel {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 320px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  display: none;
}
.notif-panel.open { display: block; animation: slideDown 0.2s ease; }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.notif-header h3 { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.mark-read { font-size: 12px; color: var(--accent-orange); }

.notif-list { padding: 8px 0; max-height: 300px; overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 18px;
  transition: var(--transition);
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(255,107,43,0.04); }
.notif-dot-item {
  width: 7px;
  height: 7px;
  background: var(--accent-orange);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-dot-item.read { background: var(--border-light); }
.notif-content { font-size: 12.5px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.modal-close { color: var(--text-muted); font-size: 16px; padding: 4px 8px; border-radius: 4px; }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-tabs {
  display: flex;
  padding: 16px 24px 0;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.modal-tab {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.active {
  background: var(--bg-hover);
  color: var(--accent-orange);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--bg-panel);
}

.modal-body { padding: 24px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13.5px;
  transition: var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255,107,43,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===== AVATAR ===== */
.avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--bg-hover);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== PAGE-SPECIFIC CONTAINERS ===== */
.page-container {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-header-left h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-header-left p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb-sep { color: var(--border-light); }
.breadcrumb-current { color: var(--text-secondary); }

/* ===== TABLES ===== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tr:hover td { background: var(--bg-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== UTILITY ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--accent-orange); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-teal { color: var(--accent-teal); }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
}
.status-active { background: rgba(46,204,113,0.15); color: #2ecc71; }
.status-pending { background: rgba(255,211,42,0.15); color: #ffc020; }
.status-paused { background: rgba(136,144,168,0.15); color: #8890a8; }
.status-overdue { background: rgba(255,71,87,0.15); color: #ff4757; }
.status-completed { background: rgba(61,139,255,0.15); color: #3d8bff; }

/* Responsive */
@media (max-width: 1200px) {
  .sidebar { width: 220px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; height: 100%; z-index: 200; }
  .sidebar.mobile-open { left: 0; }
  :root { --sidebar-width: 260px; }
}
