/* ================================================================
   ADMIN.CSS — Admin Panel Styles
   Tarih Öğretmeni Blog Platformu
   ================================================================ */

/* ================================================================
   ADMIN LAYOUT
   ================================================================ */
body.admin-body {
  background: #F1F5F9;
  display: flex;
}

/* Auth Screen */
.auth-screen {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #2D3F5C 100%);
  padding: var(--sp-4);
}
.auth-card {
  background: var(--color-surface); border-radius: var(--r-2xl);
  padding: var(--sp-10); width: 100%; max-width: 400px;
  box-shadow: var(--shadow-xl); text-align: center;
}
.auth-logo {
  font-family: var(--font-heading); font-size: var(--text-2xl);
  font-weight: 700; color: var(--color-text); margin-bottom: var(--sp-1);
}
.auth-role {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--sp-8);
}
.auth-title { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--sp-2); }
.auth-subtitle { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--sp-8); }
.auth-pin-inputs {
  display: flex; gap: var(--sp-3); justify-content: center; margin-bottom: var(--sp-6);
}
.auth-pin-input {
  width: 56px; height: 64px; border-radius: var(--r-lg);
  border: 1.5px solid var(--color-border);
  font-size: var(--text-2xl); font-weight: 700; text-align: center;
  color: var(--color-text); background: var(--color-bg);
  outline: none; transition: all var(--t-fast);
  -webkit-appearance: none; -moz-appearance: textfield;
}
.auth-pin-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(139,0,0,0.1); background: white; }
.auth-error {
  display: none; background: #FEF2F2; color: var(--color-error);
  border: 1px solid #FECACA; border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4); font-size: var(--text-sm);
  margin-bottom: var(--sp-5); align-items: center; gap: var(--sp-2);
}
.auth-error.show { display: flex; }
.auth-hint { font-size: var(--text-xs); color: var(--color-subtle); margin-top: var(--sp-4); }

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--color-primary);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100; overflow-y: auto;
  transition: transform var(--t-base);
}
.sidebar-header {
  padding: var(--sp-6);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logo {
  font-family: var(--font-heading); font-size: var(--text-xl);
  font-weight: 700; color: white; display: block; margin-bottom: 2px;
}
.sidebar-role {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-accent);
}
.sidebar-nav { flex: 1; padding: var(--sp-4) 0; }
.sidebar-section-label {
  padding: var(--sp-3) var(--sp-5);
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.3);
  margin-top: var(--sp-2);
}
.sidebar-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5); margin: 1px var(--sp-3);
  font-size: var(--text-sm); font-weight: 500;
  color: rgba(255,255,255,0.6); border-radius: var(--r-md);
  transition: all var(--t-fast); position: relative;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-link.active {
  background: rgba(139,0,0,0.25); color: white;
  font-weight: 600;
}
.sidebar-link.active::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: var(--color-accent); border-radius: 0 2px 2px 0;
}
.sidebar-link-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto; background: var(--color-accent); color: white;
  border-radius: var(--r-full); font-size: 10px; font-weight: 700;
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.sidebar-footer {
  padding: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: var(--sp-3);
}
.sidebar-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: var(--text-sm); font-weight: 600; color: white; }
.sidebar-user-status { font-size: var(--text-xs); color: rgba(255,255,255,0.4); }
.sidebar-logout {
  margin-left: auto; color: rgba(255,255,255,0.35); font-size: var(--text-lg);
  transition: color var(--t-fast); cursor: pointer;
}
.sidebar-logout:hover { color: var(--color-error); }

/* Admin Main */
.admin-main {
  flex: 1; margin-left: var(--sidebar-w);
  min-height: 100vh; display: flex; flex-direction: column;
}
.admin-topbar {
  background: white; border-bottom: 1px solid var(--color-border-lt);
  padding: 0 var(--sp-8); height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar-title { font-weight: 700; font-size: var(--text-lg); }
.admin-topbar-actions { display: flex; align-items: center; gap: var(--sp-3); }
.admin-content { padding: var(--sp-8); flex: 1; }

/* ================================================================
   DASHBOARD WIDGETS
   ================================================================ */
.dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); margin-bottom: var(--sp-8); }
.stat-card {
  background: white; border-radius: var(--r-xl);
  padding: var(--sp-6); border: 1px solid var(--color-border-lt);
  display: flex; align-items: flex-start; gap: var(--sp-4);
  transition: all var(--t-base);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card-icon {
  width: 52px; height: 52px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-card-icon.accent { background: var(--color-accent-light); }
.stat-card-icon.blue { background: #EFF6FF; }
.stat-card-icon.green { background: #F0FDF4; }
.stat-card-icon.orange { background: #FFF7ED; }
.stat-card-number {
  font-family: var(--font-heading); font-size: var(--text-3xl);
  font-weight: 700; color: var(--color-text); line-height: 1;
  margin-bottom: var(--sp-1);
}
.stat-card-label { font-size: var(--text-sm); color: var(--color-muted); }
.stat-card-trend { font-size: var(--text-xs); color: var(--color-success); margin-top: var(--sp-1); font-weight: 500; }

/* Dashboard grid */
.dashboard-grid { display: grid; grid-template-columns: 1fr 380px; gap: var(--sp-6); }
.dashboard-left, .dashboard-right { display: flex; flex-direction: column; gap: var(--sp-6); }

/* Admin card */
.admin-card {
  background: white; border-radius: var(--r-xl);
  border: 1px solid var(--color-border-lt);
  overflow: hidden;
}
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-lt);
}
.admin-card-title { font-size: var(--text-base); font-weight: 700; }
.admin-card-body { padding: var(--sp-5); }

/* Content list item */
.content-item {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-border-lt);
  transition: background var(--t-fast);
}
.content-item:last-child { border-bottom: none; }
.content-item:hover { background: var(--color-bg); }
.content-item-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.content-item-title { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: 2px; }
.content-item-meta { font-size: var(--text-xs); color: var(--color-muted); }
.content-item-actions { margin-left: auto; display: flex; gap: var(--sp-2); }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  padding: var(--sp-5); border-radius: var(--r-lg);
  border: 1.5px dashed var(--color-border);
  background: var(--color-bg); cursor: pointer;
  transition: all var(--t-base); text-align: center;
}
.quick-action-btn:hover { border-color: var(--color-accent); background: var(--color-accent-light); }
.quick-action-btn:hover .quick-action-icon { background: var(--color-accent); color: white; }
.quick-action-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--color-surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: all var(--t-base);
}
.quick-action-label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text); }

/* ================================================================
   CONTENT MANAGEMENT
   ================================================================ */
.cms-tabs {
  display: flex; gap: 2px; background: var(--color-bg);
  border-radius: var(--r-lg); padding: 3px; margin-bottom: var(--sp-6);
  border: 1px solid var(--color-border-lt); width: fit-content;
}
.cms-tab {
  padding: var(--sp-2) var(--sp-5); border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.cms-tab.active { background: white; color: var(--color-text); font-weight: 600; box-shadow: var(--shadow-xs); }

.cms-toolbar {
  display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5);
}
.cms-search {
  flex: 1; position: relative;
}
.cms-search input {
  width: 100%; padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 24px);
  border: 1.5px solid var(--color-border); border-radius: var(--r-md);
  font-size: var(--text-sm); background: white; outline: none;
  transition: border-color var(--t-fast);
}
.cms-search input:focus { border-color: var(--color-accent); }
.cms-search-icon { position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%); color: var(--color-muted); font-size: 14px; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-muted);
  border-bottom: 1px solid var(--color-border-lt); background: var(--color-bg);
}
.data-table td {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-border-lt);
  font-size: var(--text-sm); color: var(--color-text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-bg); }
.data-table td strong { font-weight: 600; }

/* Rich text editor */
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4); background: var(--color-bg);
  border: 1.5px solid var(--color-border); border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.rte-btn {
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-muted);
  transition: all var(--t-fast); cursor: pointer;
}
.rte-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.rte-btn.active { background: var(--color-primary); color: white; }
.rte-sep { width: 1px; background: var(--color-border); margin: 2px var(--sp-1); align-self: stretch; }
.rte-content {
  min-height: 280px; padding: var(--sp-5);
  border: 1.5px solid var(--color-border); border-radius: 0 0 var(--r-md) var(--r-md);
  outline: none; font-size: var(--text-sm); line-height: 1.75;
  background: white; color: var(--color-text);
}
.rte-content:focus { border-color: var(--color-accent); }

/* Hierarchical tree */
.material-tree { padding: var(--sp-2) 0; }
.tree-grade {
  margin-bottom: var(--sp-2);
  border: 1px solid var(--color-border-lt); border-radius: var(--r-lg); overflow: hidden;
}
.tree-grade-header {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); background: var(--color-bg);
  cursor: pointer; font-weight: 600; color: var(--color-text);
  transition: background var(--t-fast);
}
.tree-grade-header:hover { background: var(--color-surface-2); }
.tree-grade-header .chevron { margin-left: auto; transition: transform var(--t-base); font-size: var(--text-xs); }
.tree-grade.open .chevron { transform: rotate(180deg); }
.tree-grade-body { display: none; }
.tree-grade.open .tree-grade-body { display: block; }
.tree-unit {
  border-top: 1px solid var(--color-border-lt);
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-10);
  background: white;
}
.tree-unit-title { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); margin-bottom: var(--sp-3); }
.tree-material-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--color-border-lt); border-radius: var(--r-md);
  margin-bottom: var(--sp-2); background: var(--color-bg);
  transition: all var(--t-fast);
}
.tree-material-row:hover { border-color: var(--color-border); background: var(--color-surface); }

/* ================================================================
   MEDIA LIBRARY
   ================================================================ */
.media-upload-zone {
  border: 2.5px dashed var(--color-border);
  border-radius: var(--r-2xl); padding: var(--sp-12);
  text-align: center; cursor: pointer;
  transition: all var(--t-base); background: white;
  margin-bottom: var(--sp-6);
}
.media-upload-zone:hover, .media-upload-zone.dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}
.media-upload-icon { font-size: 3rem; margin-bottom: var(--sp-4); opacity: 0.5; }
.media-upload-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--sp-2); }
.media-upload-hint { font-size: var(--text-sm); color: var(--color-muted); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-4); }
.media-item {
  background: white; border: 1px solid var(--color-border-lt);
  border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; transition: all var(--t-base);
  position: relative;
}
.media-item:hover { box-shadow: var(--shadow-md); border-color: var(--color-border); transform: translateY(-1px); }
.media-item-thumb {
  aspect-ratio: 4/3; display: flex; align-items: center;
  justify-content: center; background: var(--color-bg);
  font-size: 2.5rem; color: var(--color-muted);
}
.media-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-item-body { padding: var(--sp-3); }
.media-item-name { font-size: var(--text-xs); font-weight: 600; color: var(--color-text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item-size { font-size: 10px; color: var(--color-muted); }
.media-item-check {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-accent); color: white;
  display: none; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.media-item.selected .media-item-check { display: flex; }
.media-item.selected { border-color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent); }

/* ================================================================
   PLANNER
   ================================================================ */
.planner-tabs {
  display: flex; gap: 2px; border-bottom: 2px solid var(--color-border-lt);
  margin-bottom: var(--sp-6);
}
.planner-tab {
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all var(--t-fast);
}
.planner-tab:hover { color: var(--color-text); }
.planner-tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); font-weight: 600; }

/* Schedule grid */
.schedule-grid {
  background: white; border-radius: var(--r-xl);
  border: 1px solid var(--color-border-lt); overflow: hidden;
}
.schedule-header {
  display: grid; grid-template-columns: 64px repeat(5, 1fr);
  background: var(--color-primary); color: white;
}
.schedule-header-cell {
  padding: var(--sp-4) var(--sp-2); text-align: center;
  font-size: var(--text-sm); font-weight: 600;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.schedule-header-cell:last-child { border-right: none; }
.schedule-row { display: grid; grid-template-columns: 64px repeat(5, 1fr); border-top: 1px solid var(--color-border-lt); }
.schedule-time {
  padding: var(--sp-3) var(--sp-2); text-align: center;
  font-size: var(--text-xs); font-weight: 700; color: var(--color-muted);
  border-right: 1px solid var(--color-border-lt); background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
}
.schedule-cell {
  padding: var(--sp-2); border-right: 1px solid var(--color-border-lt);
  min-height: 68px; transition: background var(--t-fast); cursor: pointer;
}
.schedule-cell:last-child { border-right: none; }
.schedule-cell:hover { background: var(--color-bg); }
.schedule-class-card {
  height: 100%; border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-size: 11px; font-weight: 600; line-height: 1.4;
  cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.schedule-class-card.grade-9  { background: #EFF6FF; color: #1E40AF; }
.schedule-class-card.grade-10 { background: #F0FDF4; color: #166534; }
.schedule-class-card.grade-11 { background: #FFF7ED; color: #92400E; }
.schedule-class-card.grade-12 { background: var(--color-accent-light); color: #7F1D1D; }
.schedule-class-card.yks     { background: #FAF5FF; color: #6B21A8; }
.schedule-class-name { font-weight: 700; }
.schedule-class-topic { font-weight: 400; opacity: 0.75; }

/* Curriculum calendar */
.curriculum-calendar { }
.curriculum-month { margin-bottom: var(--sp-8); }
.curriculum-month-title {
  font-family: var(--font-heading); font-size: var(--text-xl);
  font-weight: 600; color: var(--color-text);
  padding: var(--sp-4) 0 var(--sp-4);
  border-bottom: 2px solid var(--color-border-lt); margin-bottom: var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-3);
}
.curriculum-month-icon { font-size: 1.2rem; }
.curriculum-weeks { display: flex; flex-direction: column; gap: var(--sp-3); }
.curriculum-week {
  background: white; border: 1px solid var(--color-border-lt);
  border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: flex-start; gap: var(--sp-5);
  transition: all var(--t-fast);
}
.curriculum-week:hover { border-color: var(--color-border); box-shadow: var(--shadow-sm); }
.curriculum-week-num {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--color-primary); color: white;
  border-radius: var(--r-md); display: flex; align-items: center;
  justify-content: center; font-size: var(--text-xs); font-weight: 700;
}
.curriculum-week-dates { font-size: var(--text-xs); color: var(--color-muted); margin-bottom: var(--sp-2); }
.curriculum-week-input {
  border: none; outline: none; background: transparent;
  font-size: var(--text-sm); color: var(--color-text); width: 100%;
  padding: 0; font-family: var(--font-body);
}
.curriculum-week-input::placeholder { color: var(--color-subtle); }

/* To-Do / Task List */
.todo-toolbar { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.todo-add-form {
  background: white; border: 1.5px solid var(--color-border-lt);
  border-radius: var(--r-xl); padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.todo-add-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: var(--sp-3); align-items: center; }
.todo-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.todo-col { }
.todo-col-header {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--text-sm); font-weight: 700;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.todo-col-header.exams { background: #FEF2F2; color: #7F1D1D; }
.todo-col-header.prep  { background: #EFF6FF; color: #1E3A5F; }
.todo-col-header.mgmt  { background: #F0FDF4; color: #14532D; }
.todo-col-count {
  margin-left: auto; background: rgba(0,0,0,0.08);
  border-radius: var(--r-full); font-size: 10px;
  padding: 1px 6px; font-weight: 700;
}
.todo-col-body {
  background: var(--color-bg); border: 1px solid var(--color-border-lt);
  border-top: none; border-radius: 0 0 var(--r-xl) var(--r-xl);
  padding: var(--sp-4); min-height: 300px;
}
.todo-item {
  background: white; border: 1px solid var(--color-border-lt);
  border-radius: var(--r-lg); padding: var(--sp-4);
  margin-bottom: var(--sp-3); display: flex; gap: var(--sp-3);
  align-items: flex-start; transition: all var(--t-base);
}
.todo-item:hover { box-shadow: var(--shadow-sm); border-color: var(--color-border); }
.todo-item.done { opacity: 0.6; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--color-muted); }
.todo-checkbox {
  width: 18px; height: 18px; border-radius: var(--r-sm);
  border: 1.5px solid var(--color-border); flex-shrink: 0;
  cursor: pointer; transition: all var(--t-fast);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: white; margin-top: 1px;
}
.todo-item.done .todo-checkbox { background: var(--color-success); border-color: var(--color-success); }
.todo-item-body { flex: 1; }
.todo-text { font-size: var(--text-sm); font-weight: 500; color: var(--color-text); margin-bottom: var(--sp-2); line-height: 1.4; }
.todo-meta { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.todo-priority {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.04em;
}
.todo-priority.high   { background: #FEF2F2; color: var(--color-error); }
.todo-priority.medium { background: #FEF9C3; color: var(--color-warning); }
.todo-priority.low    { background: #F0FDF4; color: var(--color-success); }
.todo-due { font-size: 10px; color: var(--color-muted); }
.todo-delete { color: var(--color-subtle); font-size: var(--text-sm); cursor: pointer; transition: color var(--t-fast); }
.todo-delete:hover { color: var(--color-error); }

/* ================================================================
   MESSAGES (admin inbox)
   ================================================================ */
.messages-list { display: flex; flex-direction: column; }
.message-item {
  display: flex; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-border-lt); cursor: pointer;
  transition: background var(--t-fast); position: relative;
}
.message-item:hover { background: var(--color-bg); }
.message-item.unread::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--color-accent);
}
.message-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700;
}
.message-name { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: 2px; }
.message-preview { font-size: var(--text-xs); color: var(--color-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.message-time { font-size: 10px; color: var(--color-subtle); margin-left: auto; flex-shrink: 0; }

/* ================================================================
   RESPONSIVE ADMIN
   ================================================================ */
@media (max-width: 1024px) {
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .todo-columns { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-content { padding: var(--sp-4); }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .schedule-grid { overflow-x: auto; }
  .schedule-header, .schedule-row { min-width: 600px; }
}
