/* ============================================================
   ATELIÊ CÉLIA NUNES — Admin Stylesheet
   ============================================================ */

:root {
  --sidebar-bg: #3D2035;
  --sidebar-hover: #4f2944;
  --sidebar-active: #D4607A;
  --sidebar-text: rgba(255,255,255,0.82);
  --sidebar-text-muted: rgba(255,255,255,0.45);
  --sidebar-width: 260px;
  --header-height: 64px;
  --primary: #D4607A;
  --primary-light: #F0A0B4;
  --primary-dark: #B0405A;
  --accent: #F4B89E;
  --bg: #F5F0F2;
  --bg-light: #FFF0F3;
  --dark: #3D2035;
  --medium: #7A4B65;
  --light-text: #B08A9A;
  --white: #FFFFFF;
  --border: #e8d8df;
  --shadow: 0 2px 12px rgba(61,32,53,0.08);
  --shadow-lg: 0 6px 32px rgba(61,32,53,0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--dark); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: 'Poppins', sans-serif; font-size: 0.9rem; }

/* ============================================================
   LAYOUT
   ============================================================ */
.admin-body { display: flex; min-height: 100vh; overflow-x: hidden; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.admin-sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto; overflow-x: hidden;
}
.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-height); flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-name { color: var(--white); font-family: 'Playfair Display', serif; font-size: 0.98rem; line-height: 1.2; }
.sidebar-brand-sub { color: var(--sidebar-text-muted); font-size: 0.72rem; }
.sidebar-close-btn { display: none; color: var(--sidebar-text); padding: 0.3rem; font-size: 1.1rem; }

.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav-section { margin-bottom: 0.5rem; }
.nav-section-label {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--sidebar-text-muted); font-weight: 600;
}
.sidebar-nav-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 1.25rem; color: var(--sidebar-text); font-size: 0.88rem;
  transition: var(--transition); margin: 0.1rem 0.75rem; border-radius: var(--radius-sm);
  position: relative;
}
.sidebar-nav-item i { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sidebar-nav-item:hover { background: var(--sidebar-hover); color: var(--white); }
.sidebar-nav-item.active { background: var(--primary); color: var(--white); box-shadow: 0 4px 12px rgba(212,96,122,0.4); }
.sidebar-logout { color: rgba(255,150,150,0.8); }
.sidebar-logout:hover { background: rgba(220,53,69,0.2); color: #ff8888; }

/* ============================================================
   MAIN AREA
   ============================================================ */
.admin-main {
  margin-left: var(--sidebar-width); flex: 1;
  display: flex; flex-direction: column; min-height: 100vh;
  transition: margin-left 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================
   HEADER
   ============================================================ */
.admin-header {
  height: var(--header-height); background: var(--white);
  border-bottom: 1px solid var(--border); padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.25rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.sidebar-toggle-btn { font-size: 1.1rem; color: var(--medium); padding: 0.4rem; display: none; }
.admin-header-title h2 { font-size: 1.1rem; color: var(--dark); font-family: 'Playfair Display', serif; }
.admin-header-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.header-site-btn { color: var(--medium); font-size: 0.95rem; padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); transition: var(--transition); }
.header-site-btn:hover { background: var(--bg-light); color: var(--primary); }

.header-user-dropdown { position: relative; }
.header-user-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.4rem 0.75rem; border-radius: var(--radius); cursor: pointer;
  transition: var(--transition); background: none;
}
.header-user-btn:hover { background: var(--bg-light); }
.header-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.header-user-info { display: flex; flex-direction: column; text-align: left; }
.header-user-name { font-size: 0.82rem; font-weight: 600; color: var(--dark); line-height: 1.2; }
.header-user-role { font-size: 0.7rem; color: var(--light-text); text-transform: capitalize; }
.header-user-btn i { color: var(--light-text); font-size: 0.7rem; }

.user-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 180px; border: 1px solid var(--border);
  display: none; z-index: 200; padding: 0.5rem 0;
}
.user-dropdown-menu.show { display: block; }
.header-user-dropdown.open .user-dropdown-menu { display: block; }
.user-dropdown-menu a {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.1rem;
  font-size: 0.85rem; color: var(--dark); transition: var(--transition);
}
.user-dropdown-menu a:hover { background: var(--bg-light); color: var(--primary); }
.dropdown-logout { color: #dc3545 !important; }
.dropdown-logout:hover { background: rgba(220,53,69,0.08) !important; }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.35rem 0; }

/* ============================================================
   ALERTS / FLASH
   ============================================================ */
.admin-alerts { padding: 0 1.5rem; padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.admin-alert {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; animation: fadeInDown 0.4s ease;
}
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.admin-alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.admin-alert-danger { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.admin-alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
.admin-alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-close { margin-left: auto; opacity: 0.6; cursor: pointer; font-size: 0.8rem; transition: opacity 0.2s; }
.alert-close:hover { opacity: 1; }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.admin-content { padding: 1.5rem; flex: 1; }
.content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.content-subtitle { color: var(--light-text); font-size: 0.82rem; }
.form-back { margin-bottom: 1.25rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); box-shadow: 0 3px 10px rgba(212,96,122,0.3); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--medium); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-sm { background: transparent; color: var(--medium); border: 1px solid var(--border); padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.82rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; transition: var(--transition); }
.btn-outline-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 0.95rem; }

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 1.75rem; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.5rem;
  border-top: 4px solid; transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-gallery { border-color: var(--primary); }
.stat-events { border-color: #f4a261; }
.stat-news { border-color: #52b788; }
.stat-agenda { border-color: #4895ef; }
.stat-icon { font-size: 2rem; margin-bottom: 0.25rem; }
.stat-gallery .stat-icon { color: var(--primary); }
.stat-events .stat-icon { color: #f4a261; }
.stat-news .stat-icon { color: #52b788; }
.stat-agenda .stat-icon { color: #4895ef; }
.stat-number { font-size: 2.2rem; font-weight: 700; font-family: 'Playfair Display', serif; color: var(--dark); line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--medium); font-weight: 500; }
.stat-link { font-size: 0.78rem; color: var(--light-text); margin-top: auto; transition: color 0.2s; display: flex; align-items: center; gap: 0.3rem; }
.stat-link:hover { color: var(--primary); }

/* ============================================================
   QUICK ACTIONS
   ============================================================ */
.quick-actions-section { margin-bottom: 1.75rem; }
.section-heading { font-size: 1rem; color: var(--dark); margin-bottom: 1rem; font-family: 'Playfair Display', serif; }
.quick-actions-grid { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1rem 1.25rem; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
  color: var(--medium); font-size: 0.78rem; font-weight: 500; min-width: 90px;
}
.quick-action-btn i { font-size: 1.4rem; color: var(--primary); }
.quick-action-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--primary); }

/* ============================================================
   DASHBOARD TABLES
   ============================================================ */
.dashboard-tables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.dashboard-table-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.table-card-header h3 { font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.table-card-header h3 i { color: var(--primary); }
.table-card-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); text-align: center; }
.table-empty { text-align: center; padding: 2.5rem 1.5rem; color: var(--light-text); }
.table-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.table-empty p { margin-bottom: 1rem; font-size: 0.88rem; }

.upcoming-events-list { padding: 0.5rem 0; }
.upcoming-event-item {
  display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
.upcoming-event-item:last-child { border-bottom: none; }
.upcoming-event-item:hover { background: var(--bg-light); }
.upcoming-event-date {
  min-width: 44px; background: var(--primary); color: var(--white);
  border-radius: var(--radius-sm); padding: 0.4rem; text-align: center;
}
.ue-day { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1; }
.ue-month { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; }
.upcoming-event-info { flex: 1; min-width: 0; }
.upcoming-event-info h5 { font-size: 0.85rem; color: var(--dark); font-family: 'Poppins', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ue-location { font-size: 0.75rem; color: var(--light-text); }

/* ============================================================
   ADMIN TABLES
   ============================================================ */
.admin-table-responsive { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead tr { border-bottom: 2px solid var(--border); }
.admin-table th { padding: 0.9rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--medium); white-space: nowrap; }
.admin-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-light); }
.admin-table tbody tr.row-inactive { opacity: 0.55; }
.table-thumb { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; }
.table-thumb-placeholder { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--bg-light); display: flex; align-items: center; justify-content: center; color: var(--light-text); }
.table-title-cell { font-size: 0.88rem; color: var(--dark); font-weight: 500; }
.table-date { font-size: 0.82rem; color: var(--medium); white-space: nowrap; }
.table-location { font-size: 0.82rem; color: var(--medium); }
.table-slug { font-size: 0.78rem; color: var(--light-text); font-family: monospace; }
.text-muted { color: var(--light-text); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.25rem 0.65rem; border-radius: 50px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.status-published, .status-active { background: rgba(82,183,136,0.15); color: #2d8a62; }
.status-draft { background: rgba(108,117,125,0.12); color: #6c757d; }
.status-inactive { background: rgba(220,53,69,0.1); color: #dc3545; }

.role-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border-radius: 50px; font-size: 0.72rem; font-weight: 600; }
.role-superadmin { background: rgba(212,96,122,0.15); color: var(--primary-dark); }
.role-admin { background: rgba(244,162,97,0.15); color: #c07a2a; }
.role-editor { background: rgba(78,150,220,0.12); color: #2d6aad; }

.agenda-type-chip { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 50px; font-size: 0.72rem; font-weight: 600; }
.type-workshop { background: rgba(212,96,122,0.12); color: var(--primary); }
.type-feira { background: rgba(82,183,136,0.15); color: #2d8a62; }
.type-exposicao { background: rgba(78,150,220,0.12); color: #2d6aad; }
.type-outro { background: rgba(108,117,125,0.12); color: #6c757d; }

/* ============================================================
   ACTION BUTTONS
   ============================================================ */
.table-actions { display: flex; align-items: center; gap: 0.4rem; }
.action-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; transition: var(--transition); cursor: pointer; border: none;
}
.action-edit { background: rgba(78,150,220,0.12); color: #2d6aad; }
.action-edit:hover { background: rgba(78,150,220,0.25); }
.action-delete { background: rgba(220,53,69,0.1); color: #dc3545; }
.action-delete:hover { background: rgba(220,53,69,0.2); }
.action-view { background: rgba(82,183,136,0.12); color: #2d8a62; }
.action-view:hover { background: rgba(82,183,136,0.25); }
.action-disabled { background: var(--bg-light); color: var(--border); cursor: not-allowed; }

/* ============================================================
   ADMIN GALLERY GRID
   ============================================================ */
.admin-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.admin-gallery-item { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.admin-gallery-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.admin-gallery-img { position: relative; height: 170px; overflow: hidden; }
.admin-gallery-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.admin-gallery-item:hover .admin-gallery-img img { transform: scale(1.06); }
.featured-badge { position: absolute; top: 0.5rem; left: 0.5rem; background: var(--primary); color: var(--white); font-size: 0.68rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 50px; display: flex; align-items: center; gap: 0.3rem; }
.inactive-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 0.8rem; font-weight: 600; }
.admin-gallery-info { padding: 0.85rem; }
.admin-gallery-title { font-size: 0.85rem; color: var(--dark); margin-bottom: 0.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Poppins', sans-serif; font-weight: 500; }
.admin-gallery-meta { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.cat-chip { background: var(--bg-light); color: var(--medium); font-size: 0.7rem; padding: 0.15rem 0.6rem; border-radius: 50px; }
.order-chip { background: var(--bg-light); color: var(--light-text); font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 50px; }
.admin-gallery-actions { display: flex; gap: 0.4rem; }

/* ============================================================
   FORMS
   ============================================================ */
.admin-form { }
.form-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; overflow: hidden; }
.form-card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.form-card-header h3 { font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; color: var(--dark); }
.form-card-header h3 i { color: var(--primary); }
.form-card-body { padding: 1.5rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--medium); margin-bottom: 0.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form input[type="tel"],
.admin-form input[type="url"],
.admin-form input[type="date"],
.admin-form input[type="time"],
.admin-form input[type="datetime-local"],
.admin-form select,
.admin-form textarea {
  width: 100%; padding: 0.65rem 0.95rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.88rem; color: var(--dark); background: var(--bg);
  transition: var(--transition); outline: none;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  border-color: var(--primary); background: var(--white);
  box-shadow: 0 0 0 3px rgba(212,96,122,0.1);
}
.admin-form textarea { resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--light-text); margin-top: 0.3rem; display: block; }
.form-checkboxes { display: flex; flex-direction: column; gap: 0.6rem; }
.form-info-block { background: var(--bg-light); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 0.82rem; color: var(--medium); margin-bottom: 1rem; }
.form-divider { position: relative; text-align: center; margin: 1.25rem 0; }
.form-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.form-divider span { position: relative; background: var(--white); padding: 0 0.75rem; font-size: 0.78rem; color: var(--light-text); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.form-actions { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.form-layout-two-col { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: flex-start; }
.form-col-main { min-width: 0; }
.form-col-side { }

/* Checkboxes */
.checkbox-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.88rem; color: var(--dark); }
.checkbox-label input[type="checkbox"] { display: none; }
.checkmark {
  width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 5px;
  background: var(--bg); transition: var(--transition); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.checkbox-label input:checked + .checkmark { background: var(--primary); border-color: var(--primary); }
.checkbox-label input:checked + .checkmark::after { content: '✓'; color: var(--white); font-size: 0.75rem; font-weight: 700; }

/* File Upload */
.file-upload-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem; background: var(--bg-light); border: 2px dashed var(--primary-light);
  border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600; color: var(--primary);
  cursor: pointer; transition: var(--transition);
}
.file-upload-btn:hover { background: rgba(212,96,122,0.08); border-color: var(--primary); }
.hidden-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.image-upload-section { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }
.current-image-preview { display: flex; flex-direction: column; gap: 0.3rem; }
.current-image-preview img { max-width: 180px; max-height: 180px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid var(--border); }
.hero-preview img { max-width: 280px; max-height: 160px; object-fit: cover; }
.preview-label { font-size: 0.7rem; color: var(--light-text); text-align: center; }
.no-image-placeholder { width: 120px; height: 120px; background: var(--bg-light); border: 2px dashed var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; color: var(--light-text); font-size: 0.78rem; }
.no-image-placeholder i { font-size: 2rem; }
.upload-controls { display: flex; flex-direction: column; gap: 0.5rem; }
.image-preview-container { width: 100%; }
.upload-replace-label { font-size: 0.8rem; color: var(--medium); font-weight: 600; margin-top: 0.5rem; }

/* Rich Text Editor */
.rich-text-toolbar {
  display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap;
  padding: 0.5rem; background: var(--bg-light); border: 2px solid var(--border);
  border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.rich-text-toolbar button {
  width: 32px; height: 30px; border-radius: 4px; background: none; border: 1px solid transparent;
  cursor: pointer; font-size: 0.82rem; color: var(--medium); font-weight: 600; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.rich-text-toolbar button:hover { background: var(--white); border-color: var(--border); color: var(--primary); }
.rich-text-toolbar button.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.2rem; }
.rich-editor {
  min-height: 220px; padding: 0.85rem 1rem;
  border: 2px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.9rem; line-height: 1.7; color: var(--dark); background: var(--white);
  outline: none; transition: var(--transition);
}
.rich-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(212,96,122,0.1); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--light-text); }
.hidden-textarea { display: none !important; }

/* ============================================================
   USERS PAGE
   ============================================================ */
.user-cell { display: flex; align-items: center; gap: 0.75rem; }
.user-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header-card {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--white); border-radius: var(--radius); padding: 1.5rem 2rem;
  box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.profile-avatar-large {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; flex-shrink: 0;
}
.profile-header-info h3 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.profile-email { font-size: 0.85rem; color: var(--medium); margin-top: 0.4rem; }
.profile-last-login { font-size: 0.78rem; color: var(--light-text); margin-top: 0.2rem; }
.input-icon-wrap { position: relative; }
.input-icon-wrap i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--primary-light); font-size: 0.85rem; pointer-events: none; }
.input-icon-wrap input { padding-left: 2.5rem !important; }
.login-pwd-toggle {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--light-text);
  font-size: 0.9rem; transition: color 0.2s; padding: 0;
}
.login-pwd-toggle:hover { color: var(--medium); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
  background: linear-gradient(135deg, #3D2035 0%, #7A4B65 50%, #D4607A 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.login-bg-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.login-bg-c1 { width: 500px; height: 500px; background: rgba(244,184,158,0.1); top: -150px; right: -100px; }
.login-bg-c2 { width: 300px; height: 300px; background: rgba(240,160,180,0.12); bottom: -100px; left: -50px; }
.login-bg-c3 { width: 200px; height: 200px; background: rgba(255,255,255,0.05); top: 40%; left: 10%; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; width: 100%; }
.login-card {
  background: var(--white); border-radius: 20px; padding: 2.5rem 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3); width: 100%; max-width: 400px;
  position: relative; z-index: 1;
}
.login-brand { text-align: center; margin-bottom: 2rem; }
.login-logo-icon { display: flex; justify-content: center; margin-bottom: 1rem; }
.login-title { font-size: 1.5rem; color: var(--dark); margin-bottom: 0.25rem; }
.login-subtitle { font-size: 0.82rem; color: var(--light-text); }
.login-form { display: flex; flex-direction: column; gap: 1rem; }
.login-field { display: flex; flex-direction: column; gap: 0.4rem; }
.login-field label { font-size: 0.82rem; font-weight: 600; color: var(--medium); }
.login-input-wrap { position: relative; }
.login-input-wrap i:not(.login-pwd-toggle i) { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--primary-light); font-size: 0.88rem; pointer-events: none; }
.login-input-wrap input {
  width: 100%; padding: 0.75rem 0.9rem 0.75rem 2.75rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--dark); background: var(--bg);
  transition: var(--transition); outline: none;
}
.login-input-wrap input:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(212,96,122,0.1); }
.login-remember { display: flex; align-items: center; }
.login-remember .checkbox-label { font-size: 0.83rem; color: var(--medium); }
.btn-login {
  width: 100%; padding: 0.85rem; background: var(--primary); color: var(--white);
  border: none; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); display: flex; align-items: center;
  justify-content: center; gap: 0.5rem; margin-top: 0.5rem;
  box-shadow: 0 4px 16px rgba(212,96,122,0.4);
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,96,122,0.5); }
.login-footer { text-align: center; margin-top: 1.5rem; }
.login-footer a { font-size: 0.82rem; color: var(--light-text); transition: color 0.2s; display: inline-flex; align-items: center; gap: 0.3rem; }
.login-footer a:hover { color: var(--primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .form-layout-two-col { grid-template-columns: 1fr; }
  .form-col-side { order: -1; }
  .dashboard-tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle-btn { display: flex; }
  .sidebar-close-btn { display: flex; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; display: none; }
  .sidebar-overlay.visible { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .admin-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .admin-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-header-card { flex-direction: column; text-align: center; }
  .login-card { padding: 2rem 1.25rem; }
  .image-upload-section { flex-direction: column; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-gallery-grid { grid-template-columns: 1fr; }
}
