/* =========================================
   EIGEN — FREELANCE PLATFORM STYLES
   Design: Dark Editorial / Refined Professional
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --bg: #0f0f11;
  --bg-elevated: #16161a;
  --bg-card: #1b1b20;
  --bg-card-hover: #202026;
  --border: #2a2a32;
  --border-light: #333340;
  --accent: #c8a96e;
  --accent-dim: rgba(200, 169, 110, 0.12);
  --accent-glow: rgba(200, 169, 110, 0.25);
  --text-primary: #f0eee8;
  --text-secondary: #9896a0;
  --text-muted: #55545f;
  --sidebar-w: 240px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
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); }
img { display: block; max-width: 100%; }

/* ---- LAYOUT ---- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 28px 24px 20px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark.large { width: 52px; height: 52px; border-radius: 14px; }
.logo-e {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #0f0f11;
}
.logo-mark.large .logo-e { font-size: 26px; }
.logo-text { font-family: var(--font-display); font-weight: 700; }

.sidebar-search {
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color var(--transition);
}
.sidebar-search:focus-within { border-color: var(--accent); }
.sidebar-search i { color: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-search input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 13px; width: 100%;
}
.sidebar-search input::placeholder { color: var(--text-muted); }

.sidebar-nav {
  padding: 0 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition);
  position: relative;
}
.nav-link i { width: 17px; height: 17px; flex-shrink: 0; }
.nav-link:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}
.nav-link.active i { stroke: var(--accent); }

.badge {
  background: var(--accent);
  color: #0f0f11;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  margin-left: auto;
}

.sidebar-bottom {
  padding: 12px 12px 24px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-version {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 12px 0;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 0;
  overflow-x: hidden;
}

.section {
  display: none;
  padding: 40px 48px;
  min-height: 100vh;
  animation: fadeIn 0.3s ease;
}
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.section-sub {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent);
  color: #0f0f11;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: #d4b87a; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary i { width: 16px; height: 16px; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--border-light); color: var(--text-primary); }

.full-width { width: 100%; justify-content: center; }

/* ==================== FILTERS ==================== */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.freelancer-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: transparent;
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--border-light); color: var(--text-primary); }
.filter-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.view-btn {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.view-btn i { width: 16px; height: 16px; display: block; }
.view-btn:hover { color: var(--text-primary); }
.view-btn.active { background: var(--accent); color: #0f0f11; }

/* ==================== ORDERS ==================== */
.orders-container {
  display: grid;
  gap: 20px;
}
.orders-container.grid-view {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.orders-container.list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

/* GRID CARD */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.order-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.order-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-elevated);
}
.order-image-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 40px;
}

.order-body { padding: 20px; }
.order-cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 10px;
}
.order-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.order-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  gap: 8px;
}

.order-executor {
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-executor img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.executor-name {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.order-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.order-fav {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: rgba(15,15,17,0.7);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
  z-index: 2;
}
.order-fav:hover, .order-fav.active { color: #e05b5b; }
.order-fav i { width: 14px; height: 14px; }

/* LIST VIEW CARD */
.orders-container.list-view .order-card {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius);
}
.orders-container.list-view .order-image {
  width: 200px;
  height: auto;
  min-height: 140px;
  flex-shrink: 0;
  border-radius: 0;
}
.orders-container.list-view .order-image-placeholder {
  width: 200px;
  height: 140px;
  flex-shrink: 0;
}
.orders-container.list-view .order-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==================== FREELANCERS ==================== */
.freelancers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.freelancer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
}
.freelancer-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.freelancer-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.freelancer-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.freelancer-info { flex: 1; min-width: 0; }
.freelancer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.freelancer-role {
  font-size: 12px;
  color: var(--text-secondary);
}
.freelancer-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.freelancer-rating i { width: 14px; height: 14px; fill: var(--accent); stroke: var(--accent); }

.freelancer-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.skill-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}

.freelancer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.freelancer-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.freelancer-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.btn-sm {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200,169,110,0.3);
  transition: all var(--transition);
}
.btn-sm:hover { background: var(--accent); color: #0f0f11; }

.cases-preview {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.case-thumb {
  width: 56px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

/* ==================== FREELANCER PROFILE ==================== */
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 28px;
  transition: color var(--transition);
}
.profile-back:hover { color: var(--text-primary); }
.profile-back i { width: 15px; height: 15px; }

.profile-hero {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.profile-avatar-lg {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.profile-main { flex: 1; min-width: 200px; }
.profile-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}
.profile-tagline { color: var(--text-secondary); margin-bottom: 12px; }
.profile-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.profile-meta-item i { width: 15px; height: 15px; }
.profile-meta-item strong { color: var(--text-primary); }

.profile-actions { display: flex; gap: 10px; flex-shrink: 0; }

.profile-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.profile-section { margin-bottom: 32px; }
.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.profile-bio { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.case-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.case-card:hover { border-color: var(--border-light); }
.case-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.case-card-title {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.profile-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.profile-stat-row:last-child { border-bottom: none; }
.profile-stat-row .label { color: var(--text-secondary); }
.profile-stat-row .value { color: var(--text-primary); font-weight: 500; }

/* ==================== PROJECTS ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.project-img {
  width: 100%; height: 200px; object-fit: cover;
  background: var(--bg-elevated);
}
.project-body { padding: 18px; }
.project-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.project-client { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ==================== ANALYTICS ==================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.stat-icon {
  width: 40px; height: 40px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.stat-icon i { width: 20px; height: 20px; stroke: var(--accent); }
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.stat-delta { font-size: 12px; font-weight: 500; }
.stat-delta.up { color: #5dbe8a; }
.stat-delta.down { color: #e05b5b; }

.chart-section { margin-top: 8px; }
.sub-heading {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 0;
}
.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.bar {
  width: 100%;
  max-width: 48px;
  height: var(--h);
  border-radius: 6px 6px 0 0;
  background: var(--border-light);
  transition: background var(--transition);
}
.bar.accent { background: var(--accent); }
.bar-group:hover .bar { background: var(--accent); }
.bar-group span {
  font-size: 10px;
  color: var(--text-muted);
  padding-bottom: 12px;
  white-space: nowrap;
}

/* ==================== MESSAGES ==================== */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  height: calc(100vh - 200px);
}
.messages-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
}
.message-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.message-item:hover { background: var(--bg-card-hover); }
.message-item img {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.msg-info { flex: 1; min-width: 0; }
.msg-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
}
.msg-time { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.msg-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-item.unread .msg-preview { color: var(--text-primary); font-weight: 500; }
.unread-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.chat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.chat-placeholder i { width: 40px; height: 40px; }
.chat-placeholder p { font-size: 14px; }

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
}
.tab {
  padding: 7px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.tab:hover { color: var(--text-primary); }
.tab.active { background: var(--accent); color: #0f0f11; font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== BLOG ==================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.blog-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.blog-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg-elevated); }
.blog-body { padding: 20px; }
.blog-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.blog-title { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.blog-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.blog-author { display: flex; align-items: center; gap: 6px; }
.blog-author img { width: 22px; height: 22px; border-radius: 50%; }

/* ==================== LOGIN ==================== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 0;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.login-brand {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.login-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 6px;
}
.login-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.oauth-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateX(4px);
}
.divider {
  text-align: center;
  position: relative;
  margin-bottom: 24px;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.divider span {
  background: var(--bg-card);
  padding: 0 12px;
  position: relative;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-input.textarea { resize: vertical; }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.forgot-link, .register-hint a {
  font-size: 13px;
  color: var(--accent);
  transition: opacity var(--transition);
}
.forgot-link:hover, .register-hint a:hover { opacity: 0.8; }
.register-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.file-drop:hover { border-color: var(--accent); }
.file-drop i { width: 32px; height: 32px; color: var(--text-muted); margin: 0 auto 10px; }
.file-drop p { font-size: 13px; color: var(--text-secondary); }
.file-drop span { color: var(--accent); text-decoration: underline; }

.post-order-form {
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text-primary); }
.modal-close i { width: 16px; height: 16px; }

.modal-order-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.modal-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.modal-meta-item { font-size: 13px; color: var(--text-secondary); }
.modal-meta-item strong { color: var(--text-primary); display: block; font-size: 15px; }

.modal-executor {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: background var(--transition);
}
.modal-executor:hover { background: var(--bg-card-hover); }
.modal-executor img { width: 44px; height: 44px; border-radius: 50%; }
.modal-executor-name { font-weight: 600; font-size: 14px; }
.modal-executor-role { font-size: 12px; color: var(--text-secondary); }
.modal-actions { display: flex; gap: 10px; }

/* ==================== SELECT ==================== */
.select-styled {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  appearance: none;
  cursor: pointer;
}

/* ==================== MOBILE TOP NAV ==================== */
.mobile-topnav {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.mobile-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mobile-logo .logo-mark { width: 26px; height: 26px; }
.mobile-logo .logo-e { font-size: 13px; }
.mobile-nav-actions { display: flex; gap: 4px; }
.mobile-search-btn, .hamburger {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.mobile-search-btn:hover, .hamburger:hover { background: var(--bg-card); color: var(--text-primary); }
.mobile-search-btn i { width: 18px; height: 18px; }
.hamburger { flex-direction: column; gap: 4px; }
.hamburger span {
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  display: block;
  transition: all var(--transition);
}

.mobile-search-bar {
  display: none;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.mobile-search-bar.open { display: flex; }
.mobile-search-bar input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}
.mobile-search-bar button {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #0f0f11;
  flex-shrink: 0;
}
.mobile-search-bar button i { width: 16px; height: 16px; }

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}
.mobile-menu-overlay.open { display: block; }
.mobile-menu {
  position: fixed;
  top: 0; right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 400;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-inner { padding: 24px 16px; }
.mobile-sidenav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 15px;
  transition: all var(--transition);
}
.mobile-nav-link i { width: 18px; height: 18px; }
.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .section { padding: 32px 28px; }
  .profile-body { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-topnav { display: flex; }
  .main-content { margin-left: 0; }
  .section { padding: 24px 16px; }
  .section-title { font-size: 24px; }

  .orders-container.grid-view {
    grid-template-columns: 1fr;
  }
  .orders-container.list-view .order-card { flex-direction: column; }
  .orders-container.list-view .order-image,
  .orders-container.list-view .order-image-placeholder {
    width: 100%; height: 180px;
  }

  .freelancers-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .chat-placeholder { height: 200px; }
  .profile-hero { flex-direction: column; gap: 20px; }
  .profile-body { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
  .post-order-form { padding: 20px; }
}

@media (max-width: 480px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
