/* ===================================
   IDENTS — ADMIN STYLES
   =================================== */

/* LOGIN */
.admin-body { overflow-x: hidden; }

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 50% 60% at 30% 50%, rgba(232,197,71,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 30%, rgba(255,107,53,0.04) 0%, transparent 60%),
    var(--bg);
  position: relative;
}

.login-card {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 28px;
}
.login-logo .logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
}

.login-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 32px;
}

.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: #5865F2;
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-discord:hover { background: #4752C4; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(88,101,242,0.3); }

.login-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.login-bg-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.deco-tv {
  position: absolute;
  font-size: 200px;
  opacity: 0.02;
  top: 10%; left: -5%;
  transform: rotate(-15deg);
}
.deco-tv-2 {
  top: auto; left: auto;
  bottom: 5%; right: -5%;
  transform: rotate(10deg);
}

/* DASHBOARD LAYOUT */
.admin-dashboard {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 18px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text2);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}
.sidebar-link:hover { background: var(--bg3); color: var(--text); }
.sidebar-link.active { background: rgba(232,197,71,0.1); color: var(--accent); }
.sidebar-link svg { flex-shrink: 0; opacity: 0.7; }

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: auto 0 0;
}

.sidebar-user-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}

.sidebar-username {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.sidebar-role {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text3);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
  width: 100%;
}
.sidebar-logout:hover { color: #ff6b6b; }

/* MAIN */
.admin-main {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  background: var(--bg);
}

/* PANELS */
.admin-panel {
  display: none;
  padding: 32px 40px;
  animation: fadeInUp 0.3s ease;
}
.admin-panel.active { display: block; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.03em;
}

.panel-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}

/* DASHBOARD STATS */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}
.dash-stat-card:hover { border-color: var(--border-bright); }

.dash-stat-icon { font-size: 28px; flex-shrink: 0; }

.dash-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.dash-stat-label {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.dash-recent h2 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.dash-recent-item:hover { border-color: var(--border-bright); }

.dash-recent-thumb {
  width: 56px; height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}
.dash-recent-title { font-size: 14px; font-weight: 500; flex: 1; }
.dash-recent-meta {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* FORM CARD */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

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

.form-full { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text3); }

.form-group select {
  -webkit-appearance: none;
  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='none' stroke='%235a5870' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-hint {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
  font-family: var(--font-mono);
}

.input-with-add {
  display: flex;
  gap: 8px;
}
.input-with-add select { flex: 1; }

.btn-inline-add {
  width: 36px; height: 36px;
  background: var(--bg3);
  border: 1px solid var(--border-bright);
  color: var(--text2);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-inline-add:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* SOURCE TABS */
.source-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.source-tab {
  padding: 7px 14px;
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  color: var(--text2);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.source-tab.active { background: rgba(232,197,71,0.1); border-color: var(--accent); color: var(--accent); }

.source-input { display: none; }
.source-input.active { display: block; }
.source-input input { width: 100%; }

/* CHECKBOXES */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text2);
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  padding: 0;
}

/* FORM ACTIONS */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: #f0cf5a; transform: translateY(-1px); }

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg3);
  border: 1px solid var(--border-bright);
  color: var(--text2);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--surface2); color: var(--text); }

.btn-danger {
  padding: 10px 20px;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.3);
  color: #ff5050;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(255,80,80,0.2); }

.btn-sm { padding: 7px 14px; font-size: 13px; }

/* MANAGE TOOLBAR */
.manage-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.manage-search-input {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.manage-search-input:focus { border-color: var(--accent); }
.manage-search-input::placeholder { color: var(--text3); }
.manage-toolbar select {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 9px 32px 9px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  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='none' stroke='%235a5870' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* VIDEOS TABLE */
.videos-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.videos-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.videos-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.videos-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
.videos-table tr:last-child td { border-bottom: none; }
.videos-table tr:hover td { background: var(--bg3); }

.table-thumb {
  width: 56px; height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg3);
  display: block;
}
.table-thumb-placeholder {
  width: 56px; height: 36px;
  border-radius: 4px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.table-title { font-weight: 500; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-meta { font-size: 12px; color: var(--text3); font-family: var(--font-mono); margin-top: 2px; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-public { background: rgba(80,200,120,0.1); color: #50c878; border: 1px solid rgba(80,200,120,0.2); }
.status-unlisted { background: rgba(232,197,71,0.1); color: var(--accent); border: 1px solid rgba(232,197,71,0.2); }
.status-private { background: rgba(150,150,170,0.1); color: var(--text3); border: 1px solid rgba(150,150,170,0.2); }

.table-actions { display: flex; gap: 6px; }
.btn-table-edit, .btn-table-delete {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.btn-table-edit { background: var(--bg3); border: 1px solid var(--border-bright); color: var(--text2); }
.btn-table-edit:hover { border-color: var(--accent); color: var(--accent); }
.btn-table-delete { background: transparent; border: 1px solid transparent; color: var(--text3); }
.btn-table-delete:hover { background: rgba(255,80,80,0.1); border-color: rgba(255,80,80,0.3); color: #ff5050; }

/* TWO COL MANAGE */
.two-col-manage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.manage-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.manage-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.manage-col h2 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.03em;
}

.new-item-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.new-item-form input {
  flex: 1;
  min-width: 100px;
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}
.new-item-form input:focus { border-color: var(--accent); }
.new-item-form input::placeholder { color: var(--text3); }

.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.item-list-item:hover { border-color: var(--border-bright); }

.item-color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.item-name { flex: 1; font-size: 14px; }
.item-emoji { font-size: 16px; flex-shrink: 0; }
.item-count { font-size: 11px; color: var(--text3); font-family: var(--font-mono); }

.btn-item-delete {
  background: none; border: none; color: var(--text3); cursor: pointer; font-size: 14px; padding: 4px;
  border-radius: 4px; transition: all 0.2s;
}
.btn-item-delete:hover { color: #ff5050; background: rgba(255,80,80,0.1); }

/* SETTINGS */
.settings-section-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.settings-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.protection-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.protection-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
}
.protection-item.active { border-color: rgba(80,200,120,0.2); background: rgba(80,200,120,0.04); }
.protection-item.info { border-color: rgba(79,195,247,0.2); background: rgba(79,195,247,0.04); }

.pi-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.protection-item strong { display: block; font-size: 14px; margin-bottom: 4px; }
.protection-item p { font-size: 13px; color: var(--text2); }
.protection-item code { font-family: var(--font-mono); font-size: 12px; background: var(--bg3); padding: 1px 6px; border-radius: 3px; }

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  max-width: 320px;
}
.toast-success { background: #1a3a2a; border: 1px solid rgba(80,200,120,0.3); color: #80d8a0; }
.toast-error { background: #3a1a1a; border: 1px solid rgba(255,80,80,0.3); color: #ff9090; }
.toast-info { background: var(--surface2); border: 1px solid var(--border-bright); color: var(--text); }

@keyframes toastIn {
  from { opacity:0; transform: translateX(20px); }
  to { opacity:1; transform: translateX(0); }
}

/* CONFIRM */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-card {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.confirm-card p { font-size: 16px; margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }

/* RESPONSIVE ADMIN */
@media (max-width: 900px) {
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; }
  .two-col-manage { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: auto; }
}

@media (max-width: 640px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .admin-panel { padding: 20px 16px; }
  .form-card { padding: 20px 16px; }
}
