/**
 * QUICK ACCESS MANAGEMENT STYLES (manage.css)
 */

:root {
   --bg-page: #f8fafc;
   --bg-surface: #ffffff;
   --text-primary: #0f172a;
   --text-secondary: #334155;
   --text-muted: #64748b;
   --border-color: #e2e8f0;
   --accent: #2563eb;
   --accent-hover: #1d4ed8;
   --danger: #dc2626;
   --success: #059669;
}

* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

body {
   font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
   background: var(--bg-page);
   color: var(--text-primary);
   line-height: 1.5;
   padding-bottom: 80px;
}

/* ================= LOGIN SCREEN ================= */
.login-wrapper {
   min-height: 100vh;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 20px;
}

.login-card {
   width: 100%;
   max-width: 420px;
   background: #ffffff;
   border: 1px solid var(--border-color);
   border-radius: 18px;
   padding: 34px;
   box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.login-icon {
   width: 50px;
   height: 50px;
   border-radius: 14px;
   background: #eff6ff;
   color: var(--accent);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 22px;
   margin-bottom: 18px;
}

.login-card h1 {
   font-family: 'Plus Jakarta Sans', sans-serif;
   font-size: 22px;
   font-weight: 700;
   margin-bottom: 6px;
}

.login-card p {
   font-size: 13.5px;
   color: var(--text-muted);
   margin-bottom: 22px;
}

/* ================= TOP BAR ================= */
.admin-topbar {
   position: sticky;
   top: 0;
   z-index: 40;
   background: rgba(255, 255, 255, 0.94);
   backdrop-filter: blur(12px);
   border-bottom: 1px solid var(--border-color);
   padding: 13px 28px;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
}

.topbar-brand {
   display: flex;
   align-items: center;
   gap: 12px;
}

.brand-badge {
   width: 38px;
   height: 38px;
   border-radius: 11px;
   background: #0f172a;
   color: #ffffff;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 16px;
}

.topbar-brand h2 {
   font-family: 'Plus Jakarta Sans', sans-serif;
   font-size: 16.5px;
   font-weight: 700;
}

.topbar-brand span {
   font-size: 12px;
   color: var(--text-muted);
   display: block;
}

.topbar-actions {
   display: flex;
   align-items: center;
   gap: 10px;
   flex-wrap: wrap;
}

/* ================= BUTTONS ================= */
.btn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 9px 16px;
   border-radius: 10px;
   font-family: inherit;
   font-size: 13px;
   font-weight: 600;
   cursor: pointer;
   text-decoration: none;
   border: 1px solid transparent;
   transition: all 0.18s ease;
}

.btn-primary {
   background: var(--accent);
   color: #ffffff;
   box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
   background: var(--accent-hover);
   transform: translateY(-1px);
}

.btn-dark {
   background: #0f172a;
   color: #ffffff;
}
.btn-dark:hover {
   background: #1e293b;
}

.btn-outline {
   background: #ffffff;
   color: #334155;
   border-color: #cbd5e1;
}
.btn-outline:hover {
   background: #f8fafc;
   border-color: #94a3b8;
   color: #0f172a;
}

.btn-danger-ghost {
   background: #fef2f2;
   color: var(--danger);
   border-color: #fecaca;
}
.btn-danger-ghost:hover {
   background: var(--danger);
   color: #ffffff;
}

.btn-sm {
   padding: 6px 11px;
   font-size: 12px;
   border-radius: 8px;
}

.icon-btn {
   width: 34px;
   height: 34px;
   border-radius: 8px;
   border: 1px solid var(--border-color);
   background: #ffffff;
   color: #475569;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: all 0.15s ease;
}
.icon-btn:hover {
   background: #f1f5f9;
   color: #0f172a;
}
.icon-btn.danger:hover {
   background: #fef2f2;
   color: var(--danger);
   border-color: #fca5a5;
}

/* ================= CONTAINER & TABS ================= */
.admin-container {
   max-width: 1140px;
   margin: 24px auto;
   padding: 0 20px;
}

.flash-alert {
   padding: 13px 18px;
   border-radius: 12px;
   margin-bottom: 20px;
   font-size: 13.5px;
   font-weight: 500;
   display: flex;
   align-items: center;
   justify-content: space-between;
}
.flash-alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-alert.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.nav-tabs {
   display: flex;
   gap: 8px;
   margin-bottom: 22px;
   border-bottom: 1px solid var(--border-color);
   padding-bottom: 12px;
   flex-wrap: wrap;
}

.tab-btn {
   padding: 9px 18px;
   border-radius: 10px;
   border: 1px solid transparent;
   background: transparent;
   color: var(--text-secondary);
   font-family: inherit;
   font-size: 13.5px;
   font-weight: 600;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 8px;
   transition: all 0.18s ease;
}
.tab-btn:hover { background: #e2e8f0; color: #0f172a; }
.tab-btn.active { background: #0f172a; color: #ffffff; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.panel-card {
   background: #ffffff;
   border: 1px solid var(--border-color);
   border-radius: 16px;
   padding: 24px;
   margin-bottom: 20px;
   box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.panel-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-bottom: 18px;
   padding-bottom: 14px;
   border-bottom: 1px solid #f1f5f9;
}

.panel-header h3 {
   font-family: 'Plus Jakarta Sans', sans-serif;
   font-size: 16.5px;
   font-weight: 700;
}

.panel-header p { font-size: 12.5px; color: var(--text-muted); }

.form-grid {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 16px;
}

.form-group {
   display: flex;
   flex-direction: column;
   gap: 6px;
}
.form-group.full { grid-column: 1 / -1; }

.form-label {
   font-size: 12.5px;
   font-weight: 600;
   color: #334155;
}

.form-input {
   width: 100%;
   padding: 9px 13px;
   border: 1px solid #cbd5e1;
   border-radius: 9px;
   font-family: inherit;
   font-size: 13.5px;
   color: #0f172a;
   background: #ffffff;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
   outline: none;
   border-color: var(--accent);
   box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ================= CARD ACCORDION ================= */
.card-editor-box {
   background: #ffffff;
   border: 1px solid var(--border-color);
   border-radius: 16px;
   margin-bottom: 18px;
   overflow: hidden;
   box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
   transition: border-color 0.2s ease;
}

.card-editor-head {
   padding: 16px 22px;
   background: #f8fafc;
   border-bottom: 1px solid var(--border-color);
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   cursor: pointer;
   user-select: none;
}

.card-editor-head-left {
   display: flex;
   align-items: center;
   gap: 14px;
}

.card-preview-icon {
   width: 42px;
   height: 42px;
   border-radius: 11px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 18px;
   flex-shrink: 0;
}

.theme-badge-blue   { background: #eff6ff; color: #2563eb; }
.theme-badge-orange { background: #fffbeb; color: #d97706; }
.theme-badge-green  { background: #ecfdf5; color: #059669; }
.theme-badge-purple { background: #f5f3ff; color: #7c3aed; }
.theme-badge-cyan   { background: #ecfeff; color: #0891b2; }
.theme-badge-red    { background: #fef2f2; color: #dc2626; }

.card-editor-title {
   font-family: 'Plus Jakarta Sans', sans-serif;
   font-size: 15.5px;
   font-weight: 700;
   color: #0f172a;
}

.card-editor-meta { font-size: 12px; color: var(--text-muted); }

.card-editor-body { padding: 22px; display: none; }
.card-editor-box.is-open .card-editor-body { display: block; }
.card-editor-box.is-open .chevron-toggle { transform: rotate(180deg); }

/* ================= VISUAL ICON PICKER TRIGGER ================= */
.visual-icon-selector {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 14px;
   padding: 10px 14px;
   background: #f8fafc;
   border: 1px solid #cbd5e1;
   border-radius: 11px;
   cursor: pointer;
   transition: all 0.18s ease;
}
.visual-icon-selector:hover {
   background: #f1f5f9;
   border-color: #94a3b8;
}

.visual-icon-left {
   display: flex;
   align-items: center;
   gap: 12px;
}

.visual-icon-preview {
   width: 44px;
   height: 44px;
   border-radius: 10px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 20px;
   box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.visual-icon-info h5 {
   font-size: 13.5px;
   font-weight: 600;
   color: #0f172a;
}
.visual-icon-info span {
   font-size: 11.5px;
   color: var(--text-muted);
}

/* ================= VISUAL THEME SELECTOR ================= */
.theme-chips {
   display: flex;
   gap: 8px;
   flex-wrap: wrap;
   align-items: center;
}

.theme-chip {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   padding: 7px 12px;
   border-radius: 9px;
   border: 2px solid transparent;
   background: #f1f5f9;
   font-size: 12px;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.18s ease;
}
.theme-chip .color-dot {
   width: 10px;
   height: 10px;
   border-radius: 50%;
}
.theme-chip[data-color="blue"]   .color-dot { background: #2563eb; }
.theme-chip[data-color="orange"] .color-dot { background: #d97706; }
.theme-chip[data-color="green"]  .color-dot { background: #059669; }
.theme-chip[data-color="purple"] .color-dot { background: #7c3aed; }
.theme-chip[data-color="cyan"]   .color-dot { background: #0891b2; }
.theme-chip[data-color="red"]    .color-dot { background: #dc2626; }

.theme-chip.is-active {
   background: #ffffff;
   border-color: #0f172a;
   box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* ================= SUB-MENU ITEMS ================= */
.items-section {
   margin-top: 22px;
   padding-top: 20px;
   border-top: 1px dashed #cbd5e1;
}

.items-section-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-bottom: 12px;
}
.items-section-header h4 {
   font-size: 14px;
   font-weight: 700;
   color: #1e293b;
}

.item-row-editor {
   display: grid;
   grid-template-columns: 36px 1.2fr 1.6fr 1.2fr auto;
   gap: 10px;
   align-items: center;
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 11px;
   padding: 10px 14px;
   margin-bottom: 9px;
}

.item-num-badge {
   font-size: 12px;
   font-weight: 700;
   color: #64748b;
   text-align: center;
   background: #e2e8f0;
   padding: 4px 0;
   border-radius: 6px;
}

/* ================= VISUAL ICON PICKER MODAL ================= */
.modal-backdrop {
   position: fixed;
   inset: 0;
   background: rgba(15, 23, 42, 0.6);
   backdrop-filter: blur(4px);
   z-index: 100;
   display: none;
   align-items: center;
   justify-content: center;
   padding: 20px;
}
.modal-backdrop.is-open { display: flex; }

.modal-card {
   background: #ffffff;
   border-radius: 18px;
   width: 100%;
   max-width: 680px;
   max-height: 85vh;
   display: flex;
   flex-direction: column;
   overflow: hidden;
   box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
   padding: 18px 24px;
   border-bottom: 1px solid var(--border-color);
   display: flex;
   align-items: center;
   justify-content: space-between;
}
.modal-header h3 {
   font-family: 'Plus Jakarta Sans', sans-serif;
   font-size: 17px;
   font-weight: 700;
}

.modal-filter-bar {
   padding: 12px 24px;
   background: #f8fafc;
   border-bottom: 1px solid var(--border-color);
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.modal-search-input {
   width: 100%;
   padding: 8px 12px;
   border: 1px solid #cbd5e1;
   border-radius: 8px;
   font-size: 13px;
}

.category-pills {
   display: flex;
   gap: 6px;
   overflow-x: auto;
   padding-bottom: 2px;
}

.category-pill {
   border: none;
   background: #e2e8f0;
   color: #475569;
   padding: 4px 11px;
   border-radius: 999px;
   font-size: 11.5px;
   font-weight: 600;
   cursor: pointer;
   white-space: nowrap;
   transition: all 0.15s ease;
}
.category-pill:hover, .category-pill.active {
   background: #0f172a;
   color: #ffffff;
}

.modal-body {
   padding: 16px 24px;
   overflow-y: auto;
   flex: 1;
}

.icon-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
   gap: 10px;
}

.icon-card-choice {
   border: 1px solid #e2e8f0;
   background: #ffffff;
   border-radius: 12px;
   padding: 14px 8px;
   cursor: pointer;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 8px;
   transition: all 0.18s ease;
   text-align: center;
}
.icon-card-choice i {
   font-size: 24px;
   color: #334155;
   transition: transform 0.15s ease, color 0.15s ease;
}
.icon-card-choice span {
   font-size: 11px;
   font-weight: 500;
   color: #64748b;
   line-height: 1.25;
   word-break: break-word;
}
.icon-card-choice:hover {
   border-color: var(--accent);
   background: #eff6ff;
   transform: translateY(-2px);
   box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}
.icon-card-choice:hover i {
   color: var(--accent);
   transform: scale(1.15);
}
.icon-card-choice.is-selected {
   border-color: var(--accent);
   background: #dbeafe;
}
.icon-card-choice.is-selected i {
   color: var(--accent);
}

@media (max-width: 820px) {
   .form-grid { grid-template-columns: 1fr; }
   .item-row-editor { grid-template-columns: 1fr; }
}

