/* === RESET & BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;

    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;

    --sidebar-w: 260px;
    --sidebar-collapsed: 72px;
    --topbar-h: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
    --transition: 200ms cubic-bezier(.4, 0, .2, 1);
}

/* === DARK MODE === */
[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #293548;
    --border: #334155;
    --border-light: #293548;
    --text: #e2e8f0;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --success-light: rgba(16, 185, 129, .15);
    --warning-light: rgba(245, 158, 11, .15);
    --danger-light: rgba(239, 68, 68, .15);
    --primary-light: rgba(99, 102, 241, .2);
    --purple-light: rgba(139, 92, 246, .2);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .4), 0 2px 4px -1px rgba(0, 0, 0, .3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .5), 0 4px 6px -2px rgba(0, 0, 0, .3);
}

/* Ajustes extra en dark para inputs y auth */
[data-theme="dark"] .input-wrapper input,
[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] .form-group input[type="url"],
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .slug-wrapper input {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .auth-card {
    background: var(--surface);
}

[data-theme="dark"] .auth-hint {
    background: var(--surface-2);
}

[data-theme="dark"] .welcome-banner {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

[data-theme="dark"] .file-upload-area {
    border-color: var(--border);
}

/* Iconos sol/luna según tema */
.icon-sun {
    display: none;
}

.icon-moon {
    display: block;
}

[data-theme="dark"] .icon-sun {
    display: block;
}

[data-theme="dark"] .icon-moon {
    display: none;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

/* === AUTH PAGE === */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-2);
    font-size: 14px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: var(--danger-light);
    color: #b91c1c;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-3);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.input-wrapper input::placeholder {
    color: var(--text-3);
}

.toggle-password {
    position: absolute;
    right: 12px;
    color: var(--text-3);
    padding: 4px;
    border-radius: 4px;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--text-2);
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.auth-hint {
    margin-top: 24px;
    text-align: center;
    padding: 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-2);
}

.auth-hint code {
    background: var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary-dark);
}

/* === ADMIN LAYOUT === */
.admin-body {
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: var(--topbar-h);
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-3);
    transition: background var(--transition), color var(--transition);
}

.sidebar-toggle:hover {
    background: var(--surface-2);
    color: var(--text);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-3);
    padding: 4px 8px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-item:hover:not(.disabled) {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.disabled {
    opacity: .5;
    cursor: not-allowed;
}

.nav-item svg {
    flex-shrink: 0;
}

.badge-soon {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    background: var(--surface-2);
    color: var(--text-3);
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: .03em;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 0 4px;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--text-3);
    transition: background var(--transition), color var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--surface-2);
    color: var(--text-2);
}

.logout-btn:hover {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-avatar.sm {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 12px;
}

.user-avatar.xs {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 11px;
}

.user-details {
    overflow: hidden;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
}

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

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.breadcrumb {
    font-size: 12px;
    color: var(--text-3);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-time {
    font-size: 13px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.content-area {
    padding: 28px;
    flex: 1;
}

/* === DASHBOARD === */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.welcome-banner h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-banner p {
    opacity: .85;
    font-size: 14px;
}

.welcome-date {
    font-size: 13px;
    opacity: .8;
    text-align: right;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-primary .stat-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-success .stat-icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-warning .stat-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-danger .stat-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

.stat-trend {
    font-size: 11px;
    font-weight: 600;
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: .6;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: .3fr .7fr;
    gap: 30px;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.card-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-2);
    color: var(--text-3);
    padding: 3px 10px;
    border-radius: 20px;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 11px 22px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    background: var(--surface-2);
}

.data-table td {
    padding: 14px 22px;
    font-size: 14px;
    border-top: 1px solid var(--border-light);
}

.data-table tr:hover td {
    background: var(--surface-2);
}

.table-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.text-muted {
    color: var(--text-2);
}

.text-sm {
    font-size: 13px;
}

.empty-state {
    color: var(--text-3);
    text-align: center;
    padding: 32px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}

.badge-green {
    background: var(--success-light);
    color: #065f46;
}

.badge-red {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-purple {
    background: var(--purple-light);
    color: #5b21b6;
}

.badge-gray {
    background: var(--surface-2);
    color: var(--text-2);
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 18px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    text-align: center;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.action-btn.coming-soon {
    opacity: .5;
    cursor: not-allowed;
}

.action-btn small {
    font-size: 10px;
    color: var(--text-3);
}

/* System info */
.system-info {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
}

.system-info h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3);
    margin-bottom: 12px;
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.info-label {
    color: var(--text-3);
}

.info-value {
    font-weight: 600;
    color: var(--text-2);
}

.status-ok {
    color: var(--success);
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .badge-soon,
.sidebar.collapsed .user-details {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed+.main-content,
.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

.sidebar.collapsed .footer-actions {
    justify-content: center;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* === SECTION HEADER === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 2px;
}

/* === ROW ACTIONS === */
.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    color: var(--text-3);
    transition: all var(--transition);
    background: none;
    border: none;
    cursor: pointer;
}

.action-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.action-icon.danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* === NEWS LIST === */
.news-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-title-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-thumb.placeholder {
    color: var(--text-3);
}

.news-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.news-desc {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.slug-code {
    font-family: monospace;
    font-size: 12px;
    background: var(--surface-2);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--primary-dark);
}

.link-external {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 13px;
}

.link-external:hover {
    text-decoration: underline;
}

.link-primary {
    color: var(--primary);
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

/* === NEWS FORM === */
.form-page {
    max-width: 1100px;
}

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

.form-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

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

.required {
    color: var(--danger);
}

.field-hint {
    font-size: 12px;
    color: var(--text-3);
}

.slug-wrapper {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.slug-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.slug-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--surface-2);
    color: var(--text-3);
    font-size: 13px;
    border-right: 1px solid var(--border);
    white-space: nowrap;
}

.slug-wrapper input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    outline: none;
    font-family: monospace;
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toggle-label span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.toggle-label small {
    font-size: 12px;
    color: var(--text-3);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle-track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.toggle-switch input:checked+.toggle-track {
    background: var(--primary);
}

.toggle-switch input:checked+.toggle-track::before {
    transform: translateX(20px);
}

.meta-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.meta-label {
    color: var(--text-3);
}

.meta-value {
    font-weight: 600;
    color: var(--text-2);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.image-preview {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.image-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* File upload */
.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    transition: all var(--transition);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.file-upload-area svg {
    opacity: .5;
}

.file-upload-area small {
    font-size: 11px;
}

/* Current image block */
.current-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: opacity var(--transition);
}

.current-image img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.current-image-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
}

.remove-image-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--danger);
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .content-area {
        padding: 16px;
    }

    .welcome-banner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .welcome-date {
        text-align: center;
    }
}