:root { --a-primary: #7a1e3a; --a-dark: #2a0a16; --a-accent: #c9a227; --a-bg: #f5f3f0; --a-line: #e8e3dc; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--a-bg); font-size: 14.5px; color: #2b2b33; }
a { color: var(--a-primary); }
.admin-wrap { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 260px; background: var(--a-dark); color: #d9cdd2; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040; transition: transform .25s; }
.sb-brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-brand:hover { color: #fff; }
.sb-brand small { display: block; font-size: 11px; color: #b9a8b0; line-height: 1.3; }
.sb-logo { width: 44px; min-width: 44px; height: 44px; border-radius: 50%; background: var(--a-primary); border: 2px solid var(--a-accent); color: var(--a-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.sb-nav { padding: 10px 10px 40px; }
.sb-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #d9cdd2; text-decoration: none; border-radius: 8px; font-size: 14px; margin-bottom: 2px; }
.sb-nav a i { font-size: 1rem; width: 18px; text-align: center; opacity: .85; }
.sb-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-nav a.active { background: var(--a-primary); color: #fff; }
.sb-nav a.sb-sub { padding-left: 30px; font-size: 13px; }
.sb-group { text-transform: uppercase; font-size: 11px; letter-spacing: 1.2px; color: #8f7b84; padding: 16px 12px 6px; font-weight: 600; }

/* Main */
.main { margin-left: 260px; flex: 1; min-width: 0; }
.topnav { background: #fff; border-bottom: 1px solid var(--a-line); padding: 12px 24px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1030; }
.topnav-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.content { padding: 24px; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .content { padding: 16px; }
}

/* Cards */
.a-card { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; }
.a-card-head { padding: 14px 20px; border-bottom: 1px solid var(--a-line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.a-card-head h5 { margin: 0; font-size: 1rem; font-weight: 600; }
.a-card-body { padding: 20px; }
.stat-card { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; transition: .2s; height: 100%; }
.stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-2px); color: inherit; }
.stat-card .ic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; background: rgba(122,30,58,.08); color: var(--a-primary); }
.stat-card .n { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-card .l { color: #777; font-size: 13px; }

/* Tables */
.table-admin { margin: 0; }
.table-admin thead th { background: #faf8f6; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #777; font-weight: 600; border-bottom: 1px solid var(--a-line); white-space: nowrap; padding: 11px 14px; }
.table-admin td { padding: 10px 14px; vertical-align: middle; border-color: #f0ece7; }
.table-admin tbody tr:hover { background: #fcfbf9; }
.list-thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--a-line); display: inline-flex; align-items: center; justify-content: center; background: #f6f3ef; color: #bbb; }
.row-actions { white-space: nowrap; }
.row-actions .btn { padding: .2rem .5rem; font-size: 13px; }
.tree-child td:first-child, .tree-child .tree-title { padding-left: 34px !important; }
.tree-child .tree-title::before { content: '\21B3'; color: #bbb; margin-right: 6px; }

/* Forms */
.form-label { font-weight: 500; font-size: 13.5px; margin-bottom: 4px; }
.form-control, .form-select { font-size: 14.5px; border-color: #ddd6cd; border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--a-primary); box-shadow: 0 0 0 .2rem rgba(122,30,58,.12); }
.form-check-input:checked { background-color: var(--a-primary); border-color: var(--a-primary); }
.current-file { display: flex; align-items: center; gap: 10px; background: #faf8f6; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--a-line); }
.current-file img { width: 70px; height: 50px; object-fit: cover; border-radius: 6px; }
.btn-brand { background: var(--a-primary); color: #fff; border-color: var(--a-primary); }
.btn-brand:hover, .btn-brand:focus { background: #5d1229; color: #fff; border-color: #5d1229; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--a-line); padding: 12px 20px; border-radius: 0 0 12px 12px; display: flex; gap: 8px; z-index: 5; }
.note-editor.note-frame { border-radius: 8px; border-color: #ddd6cd !important; }
.note-editor .note-editable { min-height: 260px; background: #fff; }
.nav-tabs .nav-link { color: #555; }
.nav-tabs .nav-link.active { color: var(--a-primary); font-weight: 600; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 80% 10%, rgba(201,162,39,.25), transparent 40%), linear-gradient(135deg, #2a0a16, #7a1e3a); padding: 20px; }
.login-card { background: #fff; border-radius: 18px; padding: 40px 34px; width: 100%; max-width: 410px; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.login-card .sb-logo { width: 64px; height: 64px; font-size: 14px; margin: 0 auto 14px; }
