/* ── Reset navbar ── */
.navbar { display: none !important; }

.dashboard {
    display: flex; min-height: 100vh; background: #fafafb;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Sidebar (shared) ── */
.sidebar { width: 220px; background: #fff; border-right: 1.5px solid #e6ebf1; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1.5px solid #e6ebf1; }
.sidebar-logo { width: 32px; height: 32px; background: #1890ff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #1c1917; flex-shrink: 0; }
.sidebar-brand-name { font-size: 14px; font-weight: 700; color: #1c1917; }
.sidebar-nav { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 4px; font-size: 13.5px; font-weight: 500; color: #6b7280; cursor: pointer; transition: all 0.15s; border: none; background: none; text-align: left; width: 100%; text-decoration: none; font-family: inherit; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: #f5f6f7; color: #1c1917; }
.nav-item.active { background: #e6f4ff; color: #1890ff; font-weight: 600; }
.sidebar-footer { padding: 12px 10px; border-top: 1.5px solid #e6ebf1; }
.btn-logout { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border-radius: 4px; border: none; background: none; font-size: 13.5px; font-weight: 500; color: #ef4444; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.btn-logout:hover { background: #fff4f4; }
.btn-logout svg { width: 15px; height: 15px; }

/* ── Main Content ── */
.main-content { margin-left: 220px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.view-header { background: #fff; border-bottom: 1.5px solid #e6ebf1; padding: 14px 24px; display: flex; align-items: center; gap: 12px; }
.view-header h1 { font-size: 16px; font-weight: 700; color: #1c1917; }
.view-body { padding: 16px 24px; flex: 1; }

/* ── Cards ── */
.card { background: #fff; border: 1.5px solid #e6ebf1; border-radius: 4px; padding: 16px 18px; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 700; color: #1c1917; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f3f4f6; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 11px; background: #fafafb; border: 1.5px solid #e6ebf1; border-radius: 4px; font-size: 13px; color: #1c1917; font-family: inherit; transition: border-color 0.15s; box-sizing: border-box; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #e6ebf1; background: #fff; }
.form-group textarea { resize: vertical; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }

/* ── Buttons ── */
.btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #e6ebf1; color: #1c1917; border: 1.5px solid #e6ebf1; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.btn-primary:hover { background: #bfbfbf; }
.btn-secondary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #f3f4f6; color: #374151; border: 1.5px solid #e5e7eb; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.btn-secondary:hover { background: #e9eaec; }
.btn-danger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff4f4; color: #b91c1c; border: 1.5px solid #fca5a5; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.btn-danger:hover { background: #fee2e2; }

/* ── Messages ── */
.error-message { background: #fff4f4; border: 1px solid #fca5a5; color: #b91c1c; padding: 10px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.success-message { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; padding: 10px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.text-success { color: #16a34a; font-weight: 600; }
.text-danger { color: #dc2626; font-weight: 600; }
.text-muted { color: #9ca3af; font-size: 13px; }

/* ── Feature Toggle ── */
.feature-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.feature-row:last-child { border-bottom: none; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #e5e7eb; border-radius: 24px; transition: 0.25s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.toggle-switch input:checked + .toggle-slider { background: #bfbfbf; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { text-align: left; padding: 8px 10px; color: #9ca3af; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1.5px solid #f3f4f6; background: #fafafa; }
.data-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; color: #374151; }
.data-table tr:hover td { background: #faf9f7; }
.data-table tr:last-child td { border-bottom: none; }

.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; cursor: pointer; font-family: inherit; font-weight: 600; border: none; }
.btn-sm.btn-secondary { background: #f5f6f7; color: #1c1917; border: 1px solid #e6ebf1; }
.btn-sm.btn-secondary:hover { background: #e6ebf1; }
.btn-sm.btn-danger { background: #fff4f4; color: #b91c1c; border: 1px solid #fca5a5; }
.btn-sm.btn-danger:hover { background: #fee2e2; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.3); border: none; cursor: pointer; width: 100%; }
.modal-content { position: relative; background: #fff; border: 1.5px solid #e6ebf1; border-radius: 4px; padding: 22px 24px; width: 90%; max-width: 640px; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.modal-content h3 { font-size: 15px; font-weight: 700; color: #1c1917; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1.5px solid #e6ebf1; }

.confirm-dialog { max-width: 420px; }
.confirm-message { color: #374151; font-size: 13.5px; line-height: 1.5; }

/* ── Utilities ── */
.hidden { display: none !important; }

@media (max-width: 768px) {
    .sidebar { width: 190px; }
    .main-content { margin-left: 190px; }
    .view-body { padding: 12px 14px; }
    .form-row { flex-direction: column; }
}
