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

:root {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f3f0ff;
    --border: #e8e5f0;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: rgba(124, 58, 237, 0.08);
    --accent-gradient: linear-gradient(135deg, #7c3aed, #a855f7);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.08);
    --success: #10b981;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
    --bg: #0f0f14;
    --bg-card: #16161e;
    --bg-hover: #1e1b2e;
    --border: #2a2a3a;
    --text: #e4e4ed;
    --text-secondary: #9394a0;
    --text-muted: #5c5d6e;
    --accent: #a78bfa;
    --accent-hover: #8b5cf6;
    --accent-light: rgba(167, 139, 250, 0.1);
    --accent-gradient: linear-gradient(135deg, #7c3aed, #a855f7);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.1);
    --success: #34d399;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ===== HEADER ===== */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.logo:hover { color: var(--accent); }

.logo-placeholder {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.logo-image { width: 32px; height: 32px; border-radius: var(--radius); object-fit: cover; }
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }

.header-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.nav-link:hover { color: var(--text); background: var(--accent-light); }
.nav-link--accent:hover { color: var(--accent); }
.nav-form { margin: 0; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
    margin-left: 4px;
}

.theme-toggle:hover { background: var(--accent-light); border-color: var(--accent); }
.theme-toggle-fixed { position: fixed; top: 16px; right: 16px; z-index: 200; }

/* ===== MAIN ===== */
.main { padding: 48px 0 80px; min-height: calc(100vh - 140px); }

/* ===== HERO ===== */
.hero { text-align: center; margin-bottom: 48px; }
.hero h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { font-size: 16px; color: var(--text-secondary); }

/* ===== CATEGORY ===== */
.category { margin-bottom: 40px; }
.category-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ===== SERVICE GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: stretch;
    gap: 0;
    color: var(--text);
    transition: all 0.15s;
    overflow: hidden;
}

.service-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.service-card-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.service-card-link:hover { text-decoration: none; }

.service-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: var(--accent);
    text-decoration: none;
    border-radius: 0;
    white-space: nowrap;
    transition: background 0.15s;
    align-self: stretch;
}

.service-open-btn:hover { background: var(--accent-hover); color: white; text-decoration: none; }

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.service-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.icon-default, .icon-label {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
}

.icon-label { font-size: 20px; }

.service-info { flex: 1; min-width: 0; }
.service-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.service-desc { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 80px 24px; }
.empty-icon { margin-bottom: 16px; }
.empty-icon .logo-placeholder.large {
    width: 64px;
    height: 64px;
    font-size: 28px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
}
.empty-icon img { width: 64px; height: 64px; border-radius: var(--radius-lg); object-fit: cover; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-secondary); }

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-md);
}

.auth-header { margin-bottom: 24px; text-align: center; }
.auth-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-header p { font-size: 14px; color: var(--text-secondary); }

.auth-form .form-group { margin-bottom: 16px; }
.auth-footer { text-align: center; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.15s;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-group textarea { resize: vertical; min-height: 64px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

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

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-full { width: 100%; }

.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: var(--danger-light); }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }
.alert-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid var(--success); }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

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

.card-header h3 { font-size: 15px; font-weight: 600; }

.card-body { padding: 20px; }
.form-hidden { display: none; }
.form-hidden:not(.form-hidden) { display: block; }

/* ===== TABS ===== */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }

.tab-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

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

/* ===== TABLES ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--bg); }
.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-table td {
    padding: 12px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
    font-size: 14px;
}
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.row-muted { opacity: 0.5; }

.fw-medium { font-weight: 500; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.text-truncate { max-width: 220px; overflow: hidden; white-space: nowrap; }
.text-truncate a { font-size: 13px; }

.table-icon { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.table-emoji { font-size: 18px; }
.table-letter {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}

.action-btns { display: flex; gap: 4px; }

/* ===== TAGS & BADGES ===== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 99px;
}

.tag-default { background: var(--bg); color: var(--text-secondary); }
.tag-root { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.tag-superadmin { background: rgba(168, 85, 247, 0.12); color: #a855f7; }

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-root { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.role-superadmin { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.role-admin { background: var(--accent-light); color: var(--accent); }
.role-moderator { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.role-user { background: var(--bg); color: var(--text-secondary); }

/* ===== STATUS DOT ===== */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.status-active { background: var(--success); }
.status-inactive { background: var(--text-muted); }

/* ===== USER CELL ===== */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* ===== ICON PICKER ===== */
.icon-picker { }
.icon-preview {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.emoji-preview { font-size: 24px; }
.icon-default {
    font-weight: 700;
    font-size: 20px;
    color: var(--accent);
}

.icon-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.icon-tab {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.icon-tab.active { background: var(--accent); color: white; border-color: var(--accent); }

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.emoji-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border: 1px solid transparent;
    background: var(--bg-card);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text);
}
.emoji-btn:hover { border-color: var(--accent); background: var(--bg-hover); }
.emoji-btn.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

.image-area { padding: 16px; background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); text-align: center; }
.image-area input { margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== PROFILE ===== */
.profile-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
@media (max-width: 768px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-sidebar { }
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.profile-sidebar .profile-card { text-align: center; }
.profile-sidebar .profile-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

.profile-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

.info-grid { display: grid; gap: 12px; }
.info-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--text-secondary); }
.info-value { font-size: 14px; font-weight: 500; }

.compact-form .form-row { gap: 12px; }
.mb-lg { margin-bottom: 24px; }

/* ===== SIMPLE TABLE (profile services) ===== */
.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th {
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.simple-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }

.service-name-inline { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); text-decoration: none; }
.service-name-inline:hover { color: var(--accent); text-decoration: none; }
.inline-icon { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; }
.inline-emoji { font-size: 16px; }
.inline-letter {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all 0.15s;
}
.modal-close:hover { background: var(--bg); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.access-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}
.access-item:hover { background: var(--bg-hover); }
.access-item input { accent-color: var(--accent); }

/* ===== SETTINGS ===== */
.current-logo { margin-bottom: 12px; }
.current-logo img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-md { margin-bottom: 16px; }
.mt-md { margin-top: 20px; }

.image-upload-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-light); }
.drop-zone p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.image-preview-area { margin-top: 12px; }
.image-preview-area img { max-width: 100%; max-height: 180px; border-radius: var(--radius); border: 1px solid var(--border); }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== SERVICE PAGE ===== */
.service-page-main {
    padding: 0 0 120px;
}

.service-hero {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
}

.service-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.service-hero-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
}

.service-hero-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }

.service-hero-info h1 { font-size: 28px; font-weight: 700; margin: 6px 0; }
.service-subtitle { font-size: 15px; color: var(--text-secondary); margin: 0; }

.service-content-wrapper { padding: 32px 0; }

.service-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.service-article h2 { font-size: 22px; font-weight: 700; margin: 24px 0 12px; }
.service-article h3 { font-size: 18px; font-weight: 600; margin: 20px 0 10px; }
.service-article h4 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
.service-article p { margin-bottom: 12px; line-height: 1.7; }
.service-article a { color: var(--accent); }
.service-article img { max-width: 100%; border-radius: var(--radius); margin: 16px 0; }
.service-article blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}
.service-article pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    margin: 16px 0;
}
.service-article table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.service-article table th,
.service-article table td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; font-size: 14px; }
.service-article table th { background: var(--bg); font-weight: 600; }
.service-article ul, .service-article ol { padding-left: 24px; margin: 12px 0; }
.service-article li { margin-bottom: 6px; line-height: 1.6; }

/* Sticky CTA */
.service-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    z-index: 90;
    padding: 12px 0;
}

.service-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-cta-name { font-size: 15px; font-weight: 600; }

/* ===== EDITOR ===== */
.editor-main { padding: 32px 0 80px; }

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.editor-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.toolbar-group { display: flex; gap: 2px; align-items: center; }
.toolbar-sep { width: 1px; height: 24px; background: var(--border); margin: 0 6px; }

.editor-toolbar button {
    min-width: 36px;
    height: 32px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-toolbar button:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

.editor-area {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 24px;
    min-height: 500px;
    outline: none;
    line-height: 1.7;
    font-size: 15px;
}

.editor-area:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.editor-area h2 { font-size: 22px; font-weight: 700; margin: 20px 0 12px; }
.editor-area h3 { font-size: 18px; font-weight: 600; margin: 16px 0 10px; }
.editor-area p { margin-bottom: 12px; }
.editor-area img { max-width: 100%; border-radius: var(--radius); margin: 16px 0; }
.editor-area blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}
.editor-area pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
    margin: 16px 0;
}
.editor-area table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.editor-area table th,
.editor-area table td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.editor-area table th { background: var(--bg); font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .header-content { flex-direction: column; height: auto; padding: 12px 0; gap: 8px; }
    .header-nav { flex-wrap: wrap; justify-content: center; }
    .hero h2 { font-size: 24px; }
    .services-grid { grid-template-columns: 1fr; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 8px; }
    .action-btns { flex-direction: column; }
    .service-card { flex-direction: column; }
    .service-open-btn { width: 100%; border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 10px; }
    .service-card-link { display: flex; }
    .service-hero-content { flex-direction: column; text-align: center; }
    .service-cta-content { flex-direction: column; gap: 8px; text-align: center; }
    .editor-toolbar { gap: 2px; }
    .toolbar-sep { display: none; }
    .service-article { padding: 20px; }
}
