/* Admin layout */
.login-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--bg);
}
.login-card {
  width: 100%; max-width: 420px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px; box-shadow: var(--shadow-md);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-card h1 { font-family: var(--font-display); font-size: 28px; font-weight: 500; margin: 0 0 4px; letter-spacing: -0.5px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }

.admin-app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav-btn {
  text-align: left; padding: 10px 14px; border-radius: 10px; border: none;
  background: transparent; color: var(--text-soft); font-family: inherit; font-size: 14px;
  cursor: pointer; transition: all var(--transition);
}
.admin-nav-btn:hover { background: var(--bg); color: var(--text); }
.admin-nav-btn.active { background: var(--text); color: var(--bg); font-weight: 500; }

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

.admin-main { padding: 32px 40px; max-width: 100%; overflow-x: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.admin-header h1 { font-family: var(--font-display); font-size: 32px; font-weight: 500; margin: 0; letter-spacing: -0.6px; }
.admin-header p { margin: 4px 0 0; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px;
}
.stat-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 8px; }
.stat-card .value { font-family: var(--font-display); font-size: 32px; font-weight: 500; line-height: 1; }
.stat-card .change { font-size: 12px; color: var(--accent-strong); margin-top: 6px; }

/* Tables */
.data-table {
  width: 100%; border-collapse: collapse; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.data-table th, .data-table td { padding: 12px 16px; text-align: left; font-size: 14px; }
.data-table th {
  background: var(--surface); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface); }
.data-table .row-actions { display: flex; gap: 8px; justify-content: flex-end; }

.btn-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--border); background: transparent;
  cursor: pointer; color: var(--text-soft); transition: all var(--transition);
}
.btn-icon:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg); }
.btn-icon.danger:hover { color: #C0392B; border-color: #C0392B; }

.status-badge {
  display: inline-block; padding: 3px 10px; font-size: 11px; font-weight: 500;
  border-radius: var(--radius-pill); letter-spacing: 0.5px;
}
.status-pending { background: rgba(201, 169, 97, 0.15); color: var(--accent-strong); }
.status-confirmed { background: rgba(46, 134, 222, 0.15); color: #2E86DE; }
.status-completed { background: rgba(39, 174, 96, 0.15); color: #27AE60; }
.status-cancelled { background: rgba(192, 57, 43, 0.15); color: #C0392B; }
.status-published { background: rgba(39, 174, 96, 0.15); color: #27AE60; }
.status-draft { background: rgba(149, 165, 166, 0.2); color: var(--muted); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden],
.modal[hidden=""] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 26, 43, 0.6); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; background: var(--surface-2); border-radius: 16px; padding: 0;
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.3); border: 1px solid var(--border);
}
.modal-card header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 0; }
.modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--muted); padding: 0 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 20px;
  border-radius: var(--radius-pill); font-size: 14px; z-index: 200;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.3s ease;
}
.toast.error { background: #C0392B; color: white; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.empty-state { padding: 60px 24px; text-align: center; color: var(--muted); }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; color: var(--text); margin: 0 0 8px; }

/* Settings */
.settings-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.settings-card-title { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin: 0 0 16px; }
.settings-form { display: flex; flex-direction: column; gap: 12px; }
.settings-form .btn { align-self: flex-start; margin-top: 4px; }
.section-heading { font-family: var(--font-display); font-weight: 500; margin: 32px 0 16px; font-size: 22px; }

@media (max-width: 768px) {
  .admin-app { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .admin-main { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 12px; }
}
