/* =============================================================
   DevShare – Sketchub-Style Design System
   Mobile-first, white/light, Material Design inspired
   Max-width 600px centered container, Android app aesthetic
   ============================================================= */

:root {
  --primary: #2196F3;
  --primary-dark: #1976D2;
  --primary-light: #BBDEFB;
  --primary-bg: #E3F2FD;
  --accent: #008DCD;
  --green: #4CAF50;
  --red: #F44336;
  --orange: #FF5722;
  --yellow: #FFC107;
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --surface-3: #F0F0F0;
  --text-primary: #000000;
  --text-secondary: #4D4D4D;
  --text-tertiary: #757575;
  --text-hint: #9E9E9E;
  --border: #E0E0E0;
  --border-light: #EEEEEE;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-1: 0 1px 3px rgba(0,0,0,0.10);
  --shadow-2: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-3: 0 4px 16px rgba(0,0,0,0.14);
  --toolbar-h: 56px;
  --transition: 0.2s ease;
  --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); }
ul, ol { list-style: none; }

/* APP CONTAINER */
.app-container {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  position: relative;
}
.screen { display: flex; flex-direction: column; min-height: 100vh; }
.scroll-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* APPBAR (home style with search) */
.appbar {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.appbar-inner {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 4px;
  gap: 2px;
}

/* TOOLBAR (inner pages) */
.toolbar {
  display: flex;
  align-items: center;
  height: var(--toolbar-h);
  background: var(--surface);
  padding: 0 4px;
  border-bottom: 0.5px solid var(--border-light);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.toolbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  padding-left: 12px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toolbar-spacer { flex: 1; }

/* ICON BUTTONS */
.icon-btn {
  width: 44px; height: 44px; min-width: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
  color: var(--text-secondary);
  text-decoration: none;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text-primary); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.green { color: var(--green); }
.icon-btn.green:hover { background: #E8F5E9; }
.icon-btn.red { color: var(--red); }
.icon-btn.red:hover { background: #FFEBEE; }
.icon-btn.blue { color: var(--primary); }
.icon-btn.blue:hover { background: var(--primary-bg); }

/* SEARCH BOX */
.search-box {
  flex: 1; height: 42px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 14px; gap: 8px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--primary); background: var(--surface); }
.search-box svg { width: 18px; height: 18px; color: var(--text-hint); flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; background: transparent;
  font-size: 15px; outline: none; color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-hint); }

/* CIRCLE AVATAR (appbar) */
.circle-avatar {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: hidden; cursor: pointer;
  background: var(--surface); flex-shrink: 0;
}
.circle-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* SECTION HEADERS */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 4px;
}
.section-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.see-more {
  font-size: 13px; font-weight: 600; color: var(--primary);
  cursor: pointer; padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.see-more:hover { background: var(--primary-bg); }

/* HORIZONTAL SCROLL ROW */
.horizontal-row {
  display: flex; overflow-x: auto;
  gap: 10px; padding: 8px 12px 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.horizontal-row::-webkit-scrollbar { display: none; }

/* EDITOR CARD (horizontal square thumb) */
.editor-card {
  flex-shrink: 0; width: 110px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 6px; cursor: pointer;
  transition: transform var(--transition);
}
.editor-card:hover { transform: translateY(-2px); }
.card-image {
  width: 98px; height: 98px;
  border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-1);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; font-size: 42px;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-title {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  margin: 6px 2px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.card-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 11px; color: var(--text-tertiary);
}
.card-stats span { display: flex; align-items: center; gap: 2px; }

/* APP LIST ITEM */
.app-list-item {
  display: flex; align-items: center;
  padding: 10px 12px; gap: 12px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.app-list-item:hover { background: var(--surface-2); }
.app-icon {
  width: 52px; height: 52px; min-width: 52px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 28px;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.app-details { flex: 1; min-width: 0; }
.app-name {
  font-size: 15px; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-sub {
  font-size: 12px; color: var(--text-tertiary); margin-top: 2px;
  display: flex; align-items: center; gap: 8px;
}
.app-number { font-size: 12px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* PROFILE DRAWER */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  visibility: hidden; opacity: 0;
  transition: opacity var(--transition), visibility var(--transition);
}
.drawer-overlay.open { visibility: visible; opacity: 1; }
.drawer {
  position: fixed; top: 0; left: 0;
  width: 82%; max-width: 320px; height: 100%;
  background: var(--surface); z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  box-shadow: 2px 0 16px rgba(0,0,0,0.15);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-profile-head {
  background: var(--primary);
  padding: 28px 20px 20px; flex-shrink: 0;
}
.drawer-avatar {
  width: 70px; height: 70px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.2);
  overflow: hidden; margin-bottom: 12px;
}
.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer-name { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.drawer-email { font-size: 13px; color: rgba(255,255,255,0.88); }
.drawer-menu-item {
  display: flex; align-items: center;
  padding: 14px 20px; gap: 18px;
  border-bottom: 0.5px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none; color: var(--text-primary);
}
.drawer-menu-item:hover { background: var(--surface-2); }
.drawer-menu-icon { font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; }
.drawer-menu-text { font-size: 15px; font-weight: 500; }

/* PROFILE PAGE */
.user-row {
  display: flex; align-items: center;
  padding: 14px 12px 10px; gap: 14px;
}
.avatar-large {
  width: 68px; height: 68px; min-width: 68px;
  border-radius: 50%;
  border: 2.5px solid var(--accent);
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: var(--primary);
  overflow: hidden; cursor: pointer;
}
.avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.user-username { font-size: 13px; color: var(--text-tertiary); margin-top: 1px; }
.user-bio { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.profile-stats-row {
  display: flex; justify-content: space-around;
  padding: 8px 0 12px;
  border-bottom: 0.5px solid var(--border-light);
  margin: 0 12px;
}
.profile-stat-item {
  flex: 1; text-align: center; cursor: pointer; padding: 4px 0;
}
.profile-stat-item:hover { background: var(--surface-2); border-radius: var(--radius-sm); }
.stat-label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 2px; }
.stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.all-projects-title {
  font-size: 12px; font-weight: 700; color: var(--text-tertiary);
  letter-spacing: 0.1em; padding: 14px 16px 6px; text-transform: uppercase;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px; padding: 8px 12px 80px;
}
.project-grid-card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-1);
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.project-grid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.project-grid-image {
  width: 100%; aspect-ratio: 1/1;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; overflow: hidden;
}
.project-grid-image img { width: 100%; height: 100%; object-fit: cover; }
.project-grid-info { padding: 8px; }
.project-grid-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-grid-stats {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 3px; font-size: 11px; color: var(--text-tertiary);
}
.follow-btn {
  padding: 7px 22px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--primary);
  background: transparent; color: var(--primary);
  cursor: pointer; transition: all var(--transition); font-family: var(--font);
}
.follow-btn:hover, .follow-btn.following { background: var(--primary); color: #fff; }
.follow-btn.following { background: var(--surface-3); border-color: var(--border); color: var(--text-secondary); }

/* PROJECT DETAIL */
.project-header-row {
  display: flex; padding: 14px 14px 10px; gap: 14px;
  background: var(--surface);
}
.project-icon-large {
  width: 88px; height: 88px; min-width: 88px;
  background: linear-gradient(135deg, #2196F3, #6EC8FF);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; overflow: hidden; box-shadow: var(--shadow-2);
}
.project-icon-large img { width: 100%; height: 100%; object-fit: cover; }
.project-detail-title {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  line-height: 1.25; margin-bottom: 6px;
}
.project-author-link {
  font-size: 14px; color: var(--primary);
  font-weight: 500; text-decoration: none;
  display: flex; align-items: center; gap: 6px;
}
.project-author-link img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.tags-container {
  padding: 8px 12px; overflow-x: auto;
  display: flex; gap: 8px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border-light);
  scrollbar-width: none;
}
.tags-container::-webkit-scrollbar { display: none; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: #fff; flex-shrink: 0;
}
.tag-chip.blue { background: var(--primary); }
.tag-chip.green { background: var(--green); }
.tag-chip.orange { background: var(--orange); }
.tag-chip.neutral { background: var(--surface-3); color: var(--text-tertiary); border: 0.5px solid var(--border); }
.download-btn {
  background: var(--primary); margin: 12px;
  padding: 14px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer;
  transition: opacity var(--transition);
  text-decoration: none; border: none;
  width: calc(100% - 24px); font-family: var(--font);
}
.download-btn:hover { opacity: 0.9; }
.download-btn span { color: #fff; font-size: 15px; font-weight: 600; }
.like-btn-outline {
  margin: 0 12px 8px;
  padding: 11px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid var(--border);
  background: var(--surface); font-family: var(--font);
  width: calc(100% - 24px); font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
}
.like-btn-outline:hover { border-color: var(--red); color: var(--red); }
.like-btn-outline.liked { border-color: var(--red); color: var(--red); background: #FFF5F5; }
.like-btn-outline.liked svg { fill: var(--red); }
.bookmark-btn-row { display: flex; gap: 10px; padding: 0 12px 12px; }
.action-btn-sm {
  flex: 1; padding: 10px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition); font-family: var(--font);
  text-decoration: none;
}
.action-btn-sm:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.action-btn-sm.active { border-color: var(--yellow); color: #e65100; background: #FFF8E1; }
.info-section { background: var(--surface); margin-top: 6px; padding: 4px 0; }
.info-section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); padding: 10px 16px 6px; }
.info-section-content {
  font-size: 13px; color: var(--text-secondary);
  padding: 0 16px 12px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.code-block-wrap {
  margin: 6px 12px 12px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: #1e1e2e;
}
.code-block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-lang-badge {
  font-size: 11px; font-weight: 600; color: #6EC8FF;
  background: rgba(33,150,243,0.15); padding: 2px 10px;
  border-radius: var(--radius-full); font-family: monospace; text-transform: uppercase;
}
.copy-code-btn {
  font-size: 12px; color: #9090b8; background: none;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
  padding: 3px 10px; cursor: pointer;
  transition: all var(--transition); font-family: var(--font);
}
.copy-code-btn:hover { color: #6EC8FF; }
.copy-code-btn.copied { color: #4ade80; }
.code-block-wrap pre { margin: 0; max-height: 400px; overflow: auto; }
.code-block-wrap pre code { padding: 16px !important; font-family: 'Roboto Mono', monospace; font-size: 13px; line-height: 1.65; }

/* COMMENTS */
.comments-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-top: 4px solid var(--surface-3);
  background: var(--surface);
}
.comments-count-label { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.comment-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px;
  border-top: 0.5px solid var(--border-light);
  background: var(--surface);
  position: sticky; bottom: 0;
}
.avatar-sm {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%; overflow: hidden;
  background: var(--primary-bg); flex-shrink: 0;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.comment-input-field {
  flex: 1; padding: 9px 14px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 14px;
  outline: none; font-family: var(--font); resize: none;
  max-height: 100px; min-height: 38px;
  transition: border-color var(--transition); line-height: 1.4;
}
.comment-input-field:focus { border-color: var(--primary); background: var(--surface); }
.comment-send-btn {
  width: 38px; height: 38px; min-width: 38px;
  border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  transition: opacity var(--transition);
}
.comment-send-btn:hover { opacity: 0.85; }
.comment-send-btn svg { color: #fff; }
.comment-item {
  display: flex; padding: 12px 16px; gap: 12px;
  border-bottom: 0.5px solid var(--border-light); background: var(--surface);
}
.comment-avatar {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 50%; background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--primary);
  overflow: hidden; flex-shrink: 0;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-name-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-bottom: 3px;
}
.comment-name { font-size: 14px; font-weight: 700; color: var(--text-primary); text-decoration: none; }
.comment-time { font-size: 11px; color: var(--text-hint); }
.comment-message { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.comment-delete-btn {
  background: none; border: none; color: var(--text-hint);
  cursor: pointer; padding: 4px; border-radius: 50%;
  display: flex; align-items: center;
  transition: color var(--transition), background var(--transition);
}
.comment-delete-btn:hover { color: var(--red); background: #FFEBEE; }

/* UPLOAD / FORM */
.form-section-title { font-size: 17px; font-weight: 700; color: var(--text-primary); padding: 6px 4px; margin-bottom: 8px; }
.icon-picker-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.icon-placeholder {
  width: 64px; height: 64px; background: #455A64;
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; cursor: pointer; overflow: hidden;
  flex-shrink: 0; font-size: 34px; transition: opacity var(--transition);
}
.icon-placeholder:hover { opacity: 0.85; }
.icon-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.outlined-input {
  width: 100%; padding: 13px 16px; font-size: 15px;
  border: 1.5px solid #C0C0C0; border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--transition);
  font-family: var(--font); background: var(--surface); color: var(--text-primary);
}
.outlined-input:focus { border-color: var(--primary); }
.outlined-input::placeholder { color: var(--text-hint); }
textarea.outlined-input { resize: vertical; min-height: 100px; line-height: 1.5; }
.char-counter { text-align: right; font-size: 11px; color: var(--text-hint); margin-top: 3px; padding-right: 4px; }
.option-row {
  display: flex; align-items: center; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition);
  background: var(--surface); text-decoration: none; color: var(--text-primary);
}
.option-row:hover { background: var(--surface-2); }
.option-icon-left { font-size: 22px; width: 32px; margin-right: 12px; text-align: center; flex-shrink: 0; }
.option-text { flex: 1; font-size: 15px; color: var(--text-primary); }
.option-value { font-size: 13px; color: var(--text-tertiary); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option-arrow { font-size: 20px; color: var(--text-hint); margin-left: 4px; }
.code-input-wrap {
  border: 1.5px solid #C0C0C0; border-radius: var(--radius-sm);
  overflow: hidden; transition: border-color var(--transition);
}
.code-input-wrap:focus-within { border-color: var(--primary); }
.code-lang-selector {
  display: flex; align-items: center; padding: 8px 12px;
  background: var(--surface-3); border-bottom: 1px solid var(--border); gap: 8px;
}
.code-lang-select { border: none; background: transparent; font-size: 13px; font-family: var(--font); color: var(--text-secondary); outline: none; cursor: pointer; }
.code-textarea {
  width: 100%; min-height: 180px; padding: 12px;
  font-family: 'Roboto Mono', monospace; font-size: 13px;
  border: none; outline: none; resize: vertical;
  background: var(--surface); color: var(--text-primary); line-height: 1.6;
}

/* AUTH PAGES */
.auth-head {
  background: var(--primary); padding: 52px 24px 40px; text-align: center;
}
.auth-head-logo {
  width: 72px; height: 72px; background: rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; border: 2px solid rgba(255,255,255,0.4);
}
.auth-head-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.auth-head-sub { font-size: 14px; color: rgba(255,255,255,0.85); }
.auth-body { padding: 24px 20px; flex: 1; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; display: block; }
.auth-submit-btn {
  width: 100%; padding: 14px; background: var(--primary);
  color: #fff; border: none; border-radius: var(--radius-full);
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: opacity var(--transition); font-family: var(--font); margin-top: 8px;
}
.auth-submit-btn:hover { opacity: 0.92; }
.auth-footer-text { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-tertiary); }
.auth-footer-text a { color: var(--primary); font-weight: 600; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--text-hint); font-size: 13px;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.demo-hint {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; color: var(--text-tertiary); margin-bottom: 16px;
}
.demo-hint code { color: var(--primary); font-weight: 600; font-family: monospace; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 1100;
  visibility: hidden; opacity: 0;
  transition: opacity var(--transition), visibility var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.open { visibility: visible; opacity: 1; }
.modal-card {
  background: var(--surface); width: 88%; max-width: 380px;
  border-radius: var(--radius-xl); overflow: hidden;
  transform: scale(0.94); transition: transform 0.2s;
}
.modal-overlay.open .modal-card { transform: scale(1); }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px; color: var(--text-secondary);
  transition: background var(--transition);
}
.modal-close:hover { background: var(--surface-3); }
.modal-option {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  border-bottom: 0.5px solid var(--border-light);
  transition: background var(--transition);
}
.modal-option:last-child { border-bottom: none; }
.modal-option:hover { background: var(--surface-2); }
.modal-option.danger { color: var(--red); }
.modal-option.danger:hover { background: #FFEBEE; }
.modal-option-icon { font-size: 22px; width: 28px; text-align: center; }
.modal-list { max-height: 60vh; overflow-y: auto; }

/* ALERTS */
.alert {
  padding: 12px 16px; font-size: 14px;
  display: flex; align-items: flex-start; gap: 10px;
  margin: 8px 12px; border-radius: var(--radius-sm);
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 3px solid var(--green); }
.alert-error   { background: #FFEBEE; color: #C62828; border-left: 3px solid var(--red); }
.alert-warning { background: #FFF8E1; color: #E65100; border-left: 3px solid var(--yellow); }
.alert-info    { background: var(--primary-bg); color: var(--primary-dark); border-left: 3px solid var(--primary); }

/* TOAST */
.toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; z-index: 9999; pointer-events: none;
}
.toast {
  background: #333; color: #fff; padding: 9px 20px;
  border-radius: 40px; font-size: 13px; box-shadow: var(--shadow-3);
  animation: toastIn 0.25s ease; max-width: 300px; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* BADGES */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-danger  { background: #FFEBEE; color: #C62828; }
.badge-warning { background: #FFF8E1; color: #E65100; }
.badge-info    { background: var(--primary-bg); color: var(--primary-dark); }
.badge-muted   { background: var(--surface-3); color: var(--text-tertiary); }

/* FAB */
.fab {
  position: fixed; bottom: 24px;
  right: calc(50% - 284px);
  width: 56px; height: 56px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(33,150,243,0.5);
  cursor: pointer; z-index: 50;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none; color: #fff; border: none; font-family: var(--font);
}
.fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(33,150,243,0.6); }
.fab svg { width: 26px; height: 26px; color: #fff; }

/* EMPTY STATE */
.empty-state {
  text-align: center; padding: 60px 24px;
  background: var(--surface-2); margin: 16px; border-radius: var(--radius-xl);
}
.empty-state-emoji { font-size: 52px; margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 14px; color: var(--text-tertiary); max-width: 260px; margin: 0 auto 16px; line-height: 1.5; }

/* PAGINATION */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 20px 12px; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* SPINNER */
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
.spinner-blue { border-color: rgba(33,150,243,0.2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* UTILITY */
.divider-thick { height: 6px; background: var(--surface-3); }
.divider { height: 1px; background: var(--border-light); }
.hidden { display: none !important; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ADMIN — keeps dark theme */
.admin-body { background: #0d0d14; justify-content: flex-start; }
.admin-body .app-container { max-width: 100%; box-shadow: none; background: #0d0d14; }

/* RESPONSIVE */
@media (min-width: 600px) {
  .fab { right: calc(50% - 272px); }
}
@media (max-width: 600px) {
  .fab { right: 16px; }
  .projects-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (min-width: 768px) {
  body { background: #EFEFEF; }
}
