/* ═══════════════════════════════════════════════════
   ADMIN DASHBOARD V2 — Enhanced Styles
   ═══════════════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --admin-bg: #0a0e27;
  --admin-surface: #111535;
  --admin-surface2: #161a40;
  --admin-border: rgba(255,255,255,0.06);
  --admin-accent: #e91e8c;
  --admin-accent2: #448aff;
  --admin-green: #00e676;
  --admin-red: #ff5252;
  --admin-orange: #ff9800;
  --admin-cyan: #00e5ff;
  --admin-purple: #b388ff;
  --admin-text: #ffffff;
  --admin-text2: #8892b0;
  --admin-radius: 16px;
  --sidebar-w: 280px;
}

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(233,30,140,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(233,30,140,0.6); }

/* ─── LOGIN SCREEN ─── */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--admin-bg);
}

.bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 { width:500px; height:500px; background: var(--admin-accent); top:-200px; right:-100px; }
.orb-2 { width:400px; height:400px; background: var(--admin-accent2); bottom:-150px; left:-100px; animation-delay:-5s; }
@keyframes orbFloat { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-30px) scale(1.1)} }

.login-card {
  position: relative; z-index: 2;
  background: rgba(17,21,53,0.85); backdrop-filter: blur(20px);
  border: 1px solid var(--admin-border); border-radius: 24px;
  padding: 48px 40px; width: 420px; max-width: 92vw;
  text-align: center;
}

.login-logo { font-size: 56px; margin-bottom: 16px; animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
.login-title { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { color: var(--admin-text2); margin-bottom: 28px; font-size: 14px; }

.login-error {
  color: var(--admin-red); font-size: 13px; margin-bottom: 12px; min-height: 20px;
  transition: opacity 0.3s;
}

.form-group { margin-bottom: 18px; text-align: right; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--admin-text2); margin-bottom: 6px;
}

.login-card input {
  width: 100%; padding: 13px 16px; font-size: 14px; font-family: inherit;
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: 12px; color: var(--admin-text); outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.login-card input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.15);
}

.btn-login {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 700;
  font-family: inherit; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--admin-accent), #7b1fa2);
  color: #fff; margin-top: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(233,30,140,0.3); }

/* ─── ADMIN WRAPPER ─── */
.admin-wrapper { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w); background: var(--admin-surface);
  border-left: 1px solid var(--admin-border);
  display: flex; flex-direction: column; position: fixed;
  top: 0; right: 0; bottom: 0; z-index: 100;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--admin-border);
}
.sidebar-logo { font-size: 32px; }
.sidebar-brand { font-size: 16px; font-weight: 700; flex: 1; }
.sidebar-toggle {
  background: none; border: none; color: var(--admin-text2);
  font-size: 20px; cursor: pointer; display: none;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.nav-category {
  padding: 16px 20px 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--admin-accent); opacity: 0.7;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: var(--admin-text2);
  text-decoration: none; cursor: pointer; font-size: 14px;
  transition: all 0.2s; border-right: 3px solid transparent;
}
.nav-item:hover { background: rgba(233,30,140,0.06); color: var(--admin-text); }
.nav-item.active {
  background: rgba(233,30,140,0.1); color: var(--admin-accent);
  border-right-color: var(--admin-accent);
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--admin-border); }
.btn-logout {
  width: 100%; padding: 12px; font-size: 14px; font-family: inherit;
  background: rgba(255,82,82,0.1); border: 1px solid rgba(255,82,82,0.2);
  color: var(--admin-red); border-radius: 12px; cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,82,82,0.2); }

/* ─── MAIN CONTENT ─── */
.main-content {
  flex: 1; margin-right: var(--sidebar-w);
  padding: 0; min-height: 100vh;
  transition: margin-right 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ─── TOP BAR ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; gap: 12px;
  background: rgba(10,14,39,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-title { font-size: 18px; font-weight: 600; }
.btn-sidebar-mobile { display: none; background: none; border: none; color: var(--admin-text); font-size: 22px; cursor: pointer; }

/* ─── BUTTONS ─── */
.btn-action {
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  font-family: inherit; border: none; border-radius: 12px;
  cursor: pointer; transition: all 0.25s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-save { background: linear-gradient(135deg, var(--admin-accent), #7b1fa2); color: #fff; }
.btn-save:hover { box-shadow: 0 6px 20px rgba(233,30,140,0.3); transform: translateY(-1px); }
.btn-export { background: rgba(68,138,255,0.15); color: var(--admin-accent2); border: 1px solid rgba(68,138,255,0.2); }
.btn-export:hover { background: rgba(68,138,255,0.25); }
.btn-preview { background: rgba(0,230,118,0.12); color: var(--admin-green); border: 1px solid rgba(0,230,118,0.2); }
.btn-preview:hover { background: rgba(0,230,118,0.2); }
.btn-import { background: rgba(179,136,255,0.15); color: var(--admin-purple); border: 1px solid rgba(179,136,255,0.2); }
.btn-import:hover { background: rgba(179,136,255,0.25); }
.btn-reset { background: rgba(255,82,82,0.12); color: var(--admin-red); border: 1px solid rgba(255,82,82,0.2); }
.btn-reset:hover { background: rgba(255,82,82,0.2); }
.btn-copy { background: rgba(0,229,255,0.12); color: var(--admin-cyan); border: 1px solid rgba(0,229,255,0.2); }
.btn-copy:hover { background: rgba(0,229,255,0.2); }
.btn-add, .btn-add-gallery { background: rgba(0,230,118,0.12); color: var(--admin-green); border: 1px solid rgba(0,230,118,0.2); }
.btn-add:hover, .btn-add-gallery:hover { background: rgba(0,230,118,0.2); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 10px; }
.btn-danger { background: rgba(255,82,82,0.12); color: var(--admin-red); border: 1px solid rgba(255,82,82,0.15); }
.btn-danger:hover { background: rgba(255,82,82,0.2); }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--admin-accent); color: #fff; padding: 14px 28px;
  border-radius: 14px; font-weight: 600; font-size: 14px; z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── SECTIONS ─── */
.sections-container { padding: 28px; }
.admin-section { display: none; animation: fadeSlideIn 0.4s ease; }
.admin-section.active { display: block; }
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.section-header p { color: var(--admin-text2); font-size: 14px; }

/* ─── FORM GRID ─── */
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.form-group.full { grid-column: 1 / -1; }
.form-subtitle {
  grid-column: 1 / -1; font-size: 16px; font-weight: 600;
  color: var(--admin-accent); margin-top: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--admin-border);
}

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="date"],
.form-grid textarea,
.form-grid .styled-select {
  width: 100%; padding: 12px 16px; font-size: 14px; font-family: inherit;
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: 12px; color: var(--admin-text); outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid .styled-select:focus {
  border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(233,30,140,0.12);
}
.form-grid textarea { resize: vertical; }

.styled-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%238892b0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center;
}
.styled-select option { background: var(--admin-surface); color: var(--admin-text); }

/* ─── COLOR INPUTS ─── */
.color-input-wrap { display: flex; gap: 10px; align-items: center; }
.color-input-wrap input[type="color"] {
  width: 48px; height: 48px; border: 2px solid var(--admin-border);
  border-radius: 12px; padding: 2px; cursor: pointer; background: transparent;
}
.color-input-wrap .color-text {
  flex: 1; padding: 12px 14px; background: var(--admin-surface);
  border: 1px solid var(--admin-border); border-radius: 12px;
  color: var(--admin-text); font-family: monospace; font-size: 14px;
}

/* ─── RANGE SLIDER ─── */
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-wrap input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; background: var(--admin-surface2); border-radius: 10px;
  outline: none;
}
.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px;
  background: var(--admin-accent); border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 8px rgba(233,30,140,0.4);
}
.range-value {
  min-width: 50px; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--admin-accent); background: var(--admin-surface);
  padding: 5px 10px; border-radius: 8px;
}

/* ─── SUB SECTIONS ─── */
.sub-section {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 24px; margin-bottom: 24px;
}
.sub-title {
  font-size: 17px; font-weight: 600; margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 1px solid var(--admin-border);
}

/* ─── HEADER PREVIEW ─── */
.preview-mini {
  margin-top: 24px; background: var(--admin-surface); padding: 20px;
  border-radius: var(--admin-radius); border: 1px solid var(--admin-border);
}
.preview-label { font-size: 12px; color: var(--admin-text2); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.header-preview { text-align: center; }
.hp-badge {
  display: inline-block; background: rgba(233,30,140,0.15); color: var(--admin-accent);
  padding: 6px 18px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 14px;
}
.hp-logo { font-size: 60px; margin-bottom: 8px; }
.hp-logo img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.hp-name { font-size: 26px; font-weight: 800; }
.hp-subtitle { color: var(--admin-text2); font-size: 14px; }

/* ─── SOCIAL GRID ─── */
.social-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.social-card {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 20px;
}
.social-card-head {
  font-size: 15px; font-weight: 600; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--admin-border);
}

/* ─── ADVANCED GRID ─── */
.advanced-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.advanced-card {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 24px;
}
.advanced-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.advanced-card p { color: var(--admin-text2); font-size: 13px; margin-bottom: 16px; }
.advanced-card textarea, .advanced-card input[type="text"], .advanced-card input[type="file"] {
  width: 100%; padding: 12px; font-size: 13px; font-family: inherit;
  background: var(--admin-bg); border: 1px solid var(--admin-border);
  border-radius: 12px; color: var(--admin-text); outline: none; margin-bottom: 12px;
}

/* ─── CODE EDITOR ─── */
.code-editor {
  font-family: 'Courier New', monospace !important; font-size: 13px !important;
  background: #0d1117 !important; color: #c9d1d9 !important;
  border: 1px solid rgba(48,54,79,0.8) !important; border-radius: 12px !important;
  padding: 16px !important; line-height: 1.6; tab-size: 2; resize: vertical;
}

/* ═══════════════ SECURITY SECTION ═══════════════ */
.activity-log-controls { display: flex; gap: 10px; margin-bottom: 16px; }
.activity-log {
  background: var(--admin-bg); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 16px;
  max-height: 400px; overflow-y: auto;
}
.log-entry {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--admin-border);
}
.log-entry:last-child { border-bottom: none; }
.log-icon { font-size: 18px; min-width: 24px; text-align: center; margin-top: 2px; }
.log-content { flex: 1; }
.log-action { font-size: 14px; font-weight: 500; }
.log-time { font-size: 11px; color: var(--admin-text2); margin-top: 3px; }
.log-empty { text-align: center; color: var(--admin-text2); padding: 30px; font-size: 14px; }

/* ═══════════════ FILE MANAGER ═══════════════ */
.file-manager {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); overflow: hidden;
}

.file-tree-header {
  padding: 16px 20px; border-bottom: 1px solid var(--admin-border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.file-search-wrap { flex: 1; min-width: 200px; }
.file-search {
  width: 100%; padding: 10px 16px; font-size: 14px; font-family: inherit;
  background: var(--admin-bg); border: 1px solid var(--admin-border);
  border-radius: 10px; color: var(--admin-text); outline: none;
}
.file-search:focus { border-color: var(--admin-accent); }
.file-actions-bar { display: flex; gap: 8px; }

.file-tree { padding: 12px; max-height: 500px; overflow-y: auto; }

.file-folder {
  margin-bottom: 4px;
}
.folder-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.2s;
}
.folder-header:hover { background: rgba(233,30,140,0.06); }
.folder-icon { font-size: 18px; }
.folder-name { font-size: 14px; font-weight: 600; flex: 1; }
.folder-toggle { color: var(--admin-text2); font-size: 12px; transition: transform 0.3s; }
.folder-toggle.open { transform: rotate(90deg); }
.folder-children { padding-right: 24px; }

.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.2s;
}
.file-item:hover { background: rgba(68,138,255,0.06); }
.file-item.active { background: rgba(233,30,140,0.08); border: 1px solid rgba(233,30,140,0.15); }
.file-icon { font-size: 16px; min-width: 22px; text-align: center; }
.file-name { font-size: 13px; flex: 1; }
.file-size { font-size: 11px; color: var(--admin-text2); }
.file-download-btn {
  background: none; border: none; color: var(--admin-accent2); cursor: pointer;
  font-size: 14px; opacity: 0; transition: opacity 0.2s; padding: 4px;
}
.file-item:hover .file-download-btn { opacity: 1; }

.file-details-panel {
  border-top: 1px solid var(--admin-border);
  padding: 20px; animation: fadeSlideIn 0.3s ease;
}
.file-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.file-detail-header h3 { font-size: 16px; font-weight: 700; }
.btn-close-panel {
  background: none; border: none; color: var(--admin-text2);
  font-size: 18px; cursor: pointer;
}
.file-meta { margin-bottom: 20px; }
.meta-row {
  display: flex; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--admin-border); font-size: 13px;
}
.meta-label { color: var(--admin-text2); min-width: 100px; }
.file-dependencies { margin-bottom: 20px; }
.file-dependencies h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.dep-tag {
  display: inline-block; background: rgba(233,30,140,0.1); color: var(--admin-accent);
  padding: 4px 12px; border-radius: 20px; font-size: 11px; margin: 3px; font-weight: 500;
}
.file-detail-actions { display: flex; gap: 10px; }

/* ═══════════════ TASKS & TEAM ═══════════════ */
.task-stats-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.task-stat-card {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 20px; text-align: center;
}
.task-stat-number { font-size: 32px; font-weight: 800; color: var(--admin-accent); }
.task-stat-label { font-size: 13px; color: var(--admin-text2); margin-top: 4px; }

.team-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.team-member {
  display: flex; align-items: center; gap: 12px;
  background: var(--admin-bg); padding: 14px; border-radius: 12px;
  border: 1px solid var(--admin-border);
}
.team-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--admin-accent), var(--admin-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
}
.team-info { flex: 1; }
.team-name { font-size: 14px; font-weight: 600; }
.team-role { font-size: 12px; color: var(--admin-text2); }
.team-delete {
  background: none; border: none; color: var(--admin-red); cursor: pointer;
  font-size: 14px; opacity: 0.5; transition: opacity 0.2s;
}
.team-delete:hover { opacity: 1; }

.add-member-form, .add-task-form, .add-note-form {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 20px; margin-bottom: 20px;
}
.add-member-form { display: flex; gap: 10px; align-items: flex-end; }
.add-member-form input {
  flex: 1; padding: 10px 14px; font-size: 14px; font-family: inherit;
  background: var(--admin-bg); border: 1px solid var(--admin-border);
  border-radius: 10px; color: var(--admin-text); outline: none;
}

.task-filters {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.task-filter {
  padding: 8px 20px; font-size: 13px; font-family: inherit; font-weight: 600;
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: 12px; color: var(--admin-text2); cursor: pointer;
  transition: all 0.2s;
}
.task-filter:hover { background: rgba(233,30,140,0.06); }
.task-filter.active {
  background: rgba(233,30,140,0.12); color: var(--admin-accent);
  border-color: rgba(233,30,140,0.3);
}

.task-list { min-height: 100px; }
.task-empty { text-align: center; color: var(--admin-text2); padding: 40px; }

.task-card {
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius); padding: 18px; margin-bottom: 12px;
  transition: all 0.2s;
}
.task-card:hover { border-color: rgba(233,30,140,0.2); }
.task-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.task-checkbox {
  width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
  background: var(--admin-bg); border: 2px solid var(--admin-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all 0.2s; flex-shrink: 0; margin-top: 2px;
}
.task-checkbox.checked { background: var(--admin-green); border-color: var(--admin-green); }
.task-title-text { font-size: 15px; font-weight: 600; flex: 1; }
.task-title-text.done { text-decoration: line-through; opacity: 0.5; }
.task-priority {
  font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600;
}
.task-priority.urgent { background: rgba(255,82,82,0.15); color: var(--admin-red); }
.task-priority.high { background: rgba(255,152,0,0.15); color: var(--admin-orange); }
.task-priority.medium { background: rgba(68,138,255,0.15); color: var(--admin-accent2); }
.task-priority.low { background: rgba(0,230,118,0.12); color: var(--admin-green); }

.task-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.task-meta-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--admin-text2); }

.task-actions { display: flex; gap: 8px; margin-top: 10px; }
.task-timer-btn {
  padding: 6px 14px; font-size: 12px; font-family: inherit; font-weight: 600;
  background: rgba(0,229,255,0.1); color: var(--admin-cyan);
  border: 1px solid rgba(0,229,255,0.2); border-radius: 10px; cursor: pointer;
  transition: all 0.2s;
}
.task-timer-btn.running { background: rgba(255,82,82,0.1); color: var(--admin-red); border-color: rgba(255,82,82,0.2); }
.task-timer-btn:hover { transform: translateY(-1px); }
.task-delete-btn {
  padding: 6px 14px; font-size: 12px; font-family: inherit;
  background: rgba(255,82,82,0.08); color: var(--admin-red);
  border: 1px solid rgba(255,82,82,0.15); border-radius: 10px; cursor: pointer;
  transition: all 0.2s;
}
.task-time-display {
  font-size: 13px; font-weight: 600; color: var(--admin-cyan);
  font-family: monospace;
}

/* ═══════════════ NOTES ═══════════════ */
.notes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.note-card {
  border-radius: var(--admin-radius); padding: 20px;
  position: relative; min-height: 120px;
}
.note-card.blue { background: rgba(68,138,255,0.1); border: 1px solid rgba(68,138,255,0.2); }
.note-card.purple { background: rgba(179,136,255,0.1); border: 1px solid rgba(179,136,255,0.2); }
.note-card.pink { background: rgba(233,30,140,0.1); border: 1px solid rgba(233,30,140,0.2); }
.note-card.green { background: rgba(0,230,118,0.08); border: 1px solid rgba(0,230,118,0.15); }
.note-card.orange { background: rgba(255,152,0,0.1); border: 1px solid rgba(255,152,0,0.2); }
.note-card.cyan { background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.15); }
.note-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.note-content { font-size: 13px; color: var(--admin-text2); line-height: 1.7; white-space: pre-wrap; }
.note-date { font-size: 11px; color: var(--admin-text2); margin-top: 12px; opacity: 0.6; }
.note-delete {
  position: absolute; top: 12px; left: 12px;
  background: none; border: none; color: var(--admin-red);
  cursor: pointer; font-size: 14px; opacity: 0; transition: opacity 0.2s;
}
.note-card:hover .note-delete { opacity: 1; }

/* ═══════════════ GALLERY MANAGER ═══════════════ */
.gallery-manager { margin-top: 16px; }
.gallery-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
  margin-bottom: 16px;
}
.gallery-item {
  background: var(--admin-bg); border: 1px solid var(--admin-border);
  border-radius: 12px; padding: 14px; position: relative;
}
.gallery-item input {
  width: 100%; padding: 8px 12px; font-size: 13px; font-family: inherit;
  background: var(--admin-surface); border: 1px solid var(--admin-border);
  border-radius: 8px; color: var(--admin-text); margin-bottom: 8px; outline: none;
}
.gallery-item-preview {
  width: 100%; height: 100px; border-radius: 8px; overflow: hidden;
  background: var(--admin-surface); display: flex; align-items: center;
  justify-content: center; color: var(--admin-text2); font-size: 12px;
  margin-bottom: 8px;
}
.gallery-item-preview img { width: 100%; height: 100%; object-fit: cover; }
.gallery-remove {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255,82,82,0.8); color: #fff; border: none;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .gallery-remove { opacity: 1; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(100%); width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .sidebar-toggle, .btn-sidebar-mobile { display: block; }
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .topbar-left { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: 1fr; }
  .task-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .sections-container { padding: 16px; }
  .login-card { padding: 32px 24px; }
  .task-stats-row { grid-template-columns: 1fr; }
}
