/* ═══════════════════════════════════════════════════════════
   Altura Capital — Admin Panel CSS
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --sidebar-w: 248px;
    --topbar-h: 60px;

    --bg-app:      #0f1117;
    --bg-sidebar:  #0a0c12;
    --bg-card:     #161b26;
    --bg-input:    #1e2533;
    --bg-hover:    #1e2533;
    --bg-active:   #1a2a2a;

    --border:      #2a3141;
    --border-light:#334155;

    --teal:        #4b9e9a;
    --teal-dark:   #023b3a;
    --teal-light:  #6bbfbb;
    --teal-glow:   rgba(75,158,154,.18);
    --teal-bg:     rgba(75,158,154,.1);

    --text-primary: #e8eaf0;
    --text-secondary:#8b95a8;
    --text-muted:   #5a6478;

    --success:     #22c55e;
    --error:       #ef4444;
    --warning:     #f59e0b;
    --info:        #3b82f6;

    --radius:      12px;
    --radius-sm:   8px;
    --font:        'DM Sans', sans-serif;
    --transition:  .2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg-app);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── Layout ────────────────────────────────────────────────── */
.admin-body { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}
.sidebar-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.2rem; border-bottom: 1px solid var(--border);
    min-height: var(--topbar-h);
}
.sidebar-logo {
    display: flex; align-items: center; gap: .5rem;
    text-decoration: none; flex: 1; min-width: 0;
}
.sidebar-logo .logo-img { height: 28px; object-fit: contain; }
.sidebar-logo .logo-external { font-size: .7rem; color: var(--text-muted); }
.sidebar-logo:hover .logo-external { color: var(--teal); }
.sidebar-close { display: none; background: none; border: none; color: var(--text-muted); font-size: 1rem; padding: .25rem; }

.sidebar-section-label {
    font-size: .68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text-muted);
    padding: 1.2rem 1.2rem .4rem;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 0 .6rem; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .75rem; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: .88rem;
    transition: all var(--transition); text-decoration: none;
    position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
    background: var(--teal-bg); color: var(--teal);
    border: 1px solid rgba(75,158,154,.2);
}
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; background: var(--teal); border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: .95rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }
.badge {
    background: var(--error); color: #fff; font-size: .65rem; font-weight: 700;
    padding: .1rem .4rem; border-radius: 999px; min-width: 18px; text-align: center;
}

.sidebar-footer {
    margin-top: auto; padding: 1rem 1.2rem;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: .75rem;
}
.admin-user-info { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .7rem; color: var(--text-muted); }
.btn-logout {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    transition: all var(--transition); flex-shrink: 0;
}
.btn-logout:hover { border-color: var(--error); color: var(--error); }

/* Main area */
.admin-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex; flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.admin-topbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--topbar-h);
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem; gap: 1rem;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.page-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.menu-toggle {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; padding: .25rem;
}
.menu-toggle span {
    display: block; width: 20px; height: 2px;
    background: var(--text-secondary); border-radius: 2px; transition: all var(--transition);
}
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-btn {
    display: flex; align-items: center; gap: .4rem;
    padding: .4rem .8rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); color: var(--text-secondary);
    font-size: .8rem; transition: all var(--transition);
}
.topbar-btn:hover { border-color: var(--teal); color: var(--teal); opacity: 1; }
.topbar-user { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text-secondary); }
.user-avatar-sm {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; color: #fff;
}

/* Content area */
.admin-content { padding: 1.5rem; flex: 1; }

/* Flash alerts */
.flash-alert {
    display: flex; align-items: center; justify-content: space-between;
    padding: .8rem 1.5rem; font-size: .85rem; gap: 1rem;
}
.flash-alert button { background: none; border: none; color: inherit; opacity: .7; font-size: 1rem; flex-shrink: 0; }
.flash-success { background: rgba(34,197,94,.12); color: #22c55e; border-bottom: 1px solid rgba(34,197,94,.2); }
.flash-error   { background: rgba(239,68,68,.12);  color: #ef4444;  border-bottom: 1px solid rgba(239,68,68,.2); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.2rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: .95rem; font-weight: 600; }
.card-subtitle { font-size: .8rem; color: var(--text-secondary); margin-top: .15rem; }

/* ── Stats grid ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--teal); }
.stat-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.teal    { background: var(--teal-bg); }
.stat-icon.green   { background: rgba(34,197,94,.12); }
.stat-icon.blue    { background: rgba(59,130,246,.12); }
.stat-icon.orange  { background: rgba(245,158,11,.12); }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }
.stat-trend { font-size: .72rem; color: var(--teal); margin-top: .1rem; }

/* ── Dashboard grid ────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
.messages-list { display: flex; flex-direction: column; gap: .75rem; }
.message-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .9rem; background: var(--bg-input); border-radius: var(--radius-sm);
    border: 1px solid var(--border); transition: border-color var(--transition);
    text-decoration: none;
}
.message-item:hover { border-color: var(--teal); }
.message-item.unread { border-color: rgba(75,158,154,.3); }
.msg-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--teal-bg); color: var(--teal);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-size: .85rem; font-weight: 600; color: var(--text-primary); }
.msg-preview { font-size: .78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.msg-time { font-size: .72rem; color: var(--text-muted); flex-shrink: 0; }
.msg-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; margin-top: .35rem; }

.quick-links { display: flex; flex-direction: column; gap: .6rem; }
.quick-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .8rem 1rem; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: .85rem;
    transition: all var(--transition); text-decoration: none;
}
.quick-link:hover { border-color: var(--teal); color: var(--text-primary); opacity: 1; transform: translateX(3px); }
.quick-link-icon { font-size: 1rem; width: 24px; text-align: center; }

/* ── Pages editor list ─────────────────────────────────────── */
.pages-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.page-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    transition: all var(--transition); text-decoration: none;
    display: flex; flex-direction: column; gap: .75rem;
}
.page-card:hover { border-color: var(--teal); transform: translateY(-2px); opacity: 1; }
.page-card-icon { font-size: 2rem; }
.page-card-name { font-size: .95rem; font-weight: 600; color: var(--text-primary); }
.page-card-meta { font-size: .75rem; color: var(--text-muted); }
.page-card-action {
    display: inline-flex; align-items: center; gap: .4rem;
    color: var(--teal); font-size: .78rem; font-weight: 500; margin-top: auto;
}

/* ── Section editor ────────────────────────────────────────── */
.section-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-tab {
    padding: .5rem 1rem; border-radius: 999px; font-size: .82rem; font-weight: 500;
    background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
}
.section-tab:hover { border-color: var(--teal); color: var(--text-primary); }
.section-tab.active { background: var(--teal-bg); border-color: var(--teal); color: var(--teal); }

.field-group { margin-bottom: 1.25rem; }
.field-label {
    display: block; font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-secondary); margin-bottom: .4rem;
}
.field-hint { font-size: .72rem; color: var(--text-muted); margin-bottom: .4rem; }
.field-input {
    width: 100%; padding: .65rem .9rem;
    background: var(--bg-input); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: .88rem; outline: none; transition: border-color var(--transition);
}
.field-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow); }
textarea.field-input { resize: vertical; min-height: 100px; line-height: 1.6; }
select.field-input { cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234b9e9a'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; padding-right: 2.5rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Repeater (for lists) */
.repeater-item {
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .6rem;
    position: relative;
}
.repeater-handle { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); cursor: grab; color: var(--text-muted); }
.repeater-remove { position: absolute; right: .75rem; top: .75rem; background: none; border: none; color: var(--error); font-size: 1rem; line-height: 1; }
.btn-add-item {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem 1rem; border-radius: var(--radius-sm);
    border: 1px dashed var(--border); color: var(--text-muted);
    background: transparent; font-size: .82rem; transition: all var(--transition);
}
.btn-add-item:hover { border-color: var(--teal); color: var(--teal); }

/* ── Tables ────────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; padding: .65rem 1rem;
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: .85rem 1rem; border-bottom: 1px solid var(--border);
    font-size: .85rem; color: var(--text-secondary); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.data-table td strong { color: var(--text-primary); }

/* Table badges */
.tag {
    display: inline-block; padding: .2rem .55rem; border-radius: 999px;
    font-size: .7rem; font-weight: 600;
}
.tag-unread  { background: var(--teal-bg); color: var(--teal); }
.tag-read    { background: var(--bg-input); color: var(--text-muted); }
.tag-success { background: rgba(34,197,94,.12); color: var(--success); }
.tag-warn    { background: rgba(245,158,11,.12); color: var(--warning); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.2rem; border-radius: var(--radius-sm);
    font-size: .85rem; font-weight: 600; cursor: pointer;
    border: none; transition: all var(--transition); font-family: var(--font);
    text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: #fff; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-secondary:hover { border-color: var(--teal); color: var(--text-primary); }
.btn-danger { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: var(--error); }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn-sm { padding: .4rem .8rem; font-size: .78rem; }
.btn-icon { padding: .5rem; min-width: 32px; justify-content: center; }

/* Action bar */
.action-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.action-bar-left, .action-bar-right { display: flex; align-items: center; gap: .75rem; }

/* Search input */
.search-input {
    display: flex; align-items: center; gap: .5rem;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .4rem .8rem;
    color: var(--text-secondary); font-size: .85rem; transition: border-color var(--transition);
}
.search-input:focus-within { border-color: var(--teal); }
.search-input input { background: none; border: none; outline: none; color: var(--text-primary); font-size: .85rem; width: 200px; }
.search-input span { color: var(--text-muted); }

/* ── Media grid ────────────────────────────────────────────── */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.media-item {
    background: var(--bg-input); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden;
    cursor: pointer; transition: all var(--transition); position: relative;
}
.media-item:hover { border-color: var(--teal); }
.media-item.selected { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow); }
.media-thumb { width: 100%; height: 100px; object-fit: cover; display: block; }
.media-thumb.doc { display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--bg-hover); height: 100px; }
.media-info { padding: .5rem .6rem; }
.media-name { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.media-size { font-size: .68rem; color: var(--text-muted); }
.media-check {
    position: absolute; top: .5rem; right: .5rem;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--teal); color: #fff; font-size: .7rem;
    display: none; align-items: center; justify-content: center;
}
.media-item.selected .media-check { display: flex; }

.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 3rem 2rem; text-align: center;
    transition: all var(--transition); cursor: pointer; margin-bottom: 1.5rem;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--teal); background: var(--teal-bg); }
.upload-zone-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.upload-zone-text { font-size: .9rem; color: var(--text-secondary); }
.upload-zone-hint { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; }

/* ── Settings form ─────────────────────────────────────────── */
.settings-sections { display: flex; flex-direction: column; gap: 1.5rem; }
.settings-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.settings-section-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.settings-section-icon { font-size: 1.1rem; }
.settings-section-title { font-size: .92rem; font-weight: 600; }
.settings-section-body { padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.settings-section-body .field-group { margin: 0; }
.settings-section-body .field-group.full { grid-column: 1 / -1; }

/* ── Login page ─────────────────────────────────────────────── */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg-app); padding: 1.5rem;
}
.login-card {
    width: 100%; max-width: 400px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 2.5rem; box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo img { height: 40px; }
.login-logo p { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }
.login-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: .4rem; }
.login-subtitle { font-size: .82rem; color: var(--text-muted); text-align: center; margin-bottom: 2rem; }
.login-form .field-group { margin-bottom: 1rem; }
.login-form .btn { width: 100%; justify-content: center; padding: .8rem; font-size: .95rem; margin-top: .5rem; }
.login-alert { padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .85rem; margin-bottom: 1.2rem; }
.login-alert.error { background: rgba(239,68,68,.12); color: var(--error); border: 1px solid rgba(239,68,68,.3); }
.login-alert.info  { background: var(--teal-bg); color: var(--teal); border: 1px solid rgba(75,158,154,.3); }
.login-back { text-align: center; margin-top: 1.5rem; font-size: .8rem; color: var(--text-muted); }
.login-back a { color: var(--teal); }

/* ── Users ─────────────────────────────────────────────────── */
.user-row-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--teal-bg); color: var(--teal);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700;
}

/* ── Message detail ────────────────────────────────────────── */
.message-detail { max-width: 720px; }
.msg-detail-header { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1.5rem; }
.msg-detail-title { font-size: 1.3rem; font-weight: 700; }
.msg-meta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; }
.msg-meta-item { font-size: .82rem; color: var(--text-muted); display: flex; gap: .4rem; }
.msg-meta-item strong { color: var(--text-secondary); }
.msg-body-text {
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1.2rem;
    font-size: .9rem; line-height: 1.7; color: var(--text-secondary);
    white-space: pre-wrap; margin-bottom: 1.5rem;
}
.msg-reply-area { margin-top: 1rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .settings-section-body { grid-template-columns: 1fr; }
    .settings-section-body .field-group.full { grid-column: 1; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,.5); }
    .sidebar-close { display: block; }
    .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .3s; }
    .sidebar-overlay.show { opacity: 1; pointer-events: all; }
    .admin-main { margin-left: 0; }
    .menu-toggle { display: flex; }
    .topbar-user span { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .pages-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .admin-content { padding: 1rem; }
    .pages-list { grid-template-columns: 1fr; }
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: .8rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Pagination */
.pagination { display: flex; gap: .4rem; align-items: center; margin-top: 1.5rem; }
.page-btn {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-secondary); text-decoration: none; transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { border-color: var(--teal); color: var(--teal); }
.page-btn.active { background: var(--teal-bg); }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: .4rem; }
.empty-state-text { font-size: .85rem; color: var(--text-muted); }

/* Image preview */
.img-preview-wrap { position: relative; display: inline-block; }
.img-preview-wrap img { max-height: 120px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
