/**
 * Topz - Admin Panel Stylesheet
 */

:root {
    --admin-primary: #2563eb;
    --admin-primary-hover: #1d4ed8;
    --admin-sidebar-bg: #0f172a;
    --admin-sidebar-text: #cbd5e1;
    --admin-bg: #f1f5f9;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #1e293b;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.admin-body {
    font-family: var(--font);
    background-color: var(--admin-bg);
    color: var(--admin-text);
    font-size: 14px;
    line-height: 1.5;
}

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

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid #1e293b;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.brand-bolt {
    font-size: 22px;
}

.sidebar-brand small {
    font-size: 11px;
    background: #2563eb;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.sidebar-nav {
    padding: 20px 12px;
    flex-grow: 1;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1px;
    padding: 10px 14px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s;
}

.nav-item:hover {
    background: #1e293b;
    color: #ffffff;
}

.nav-item.active {
    background: var(--admin-primary);
    color: #ffffff;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.btn-logout {
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #1e293b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details strong {
    color: #ffffff;
    font-size: 13px;
}

.user-details small {
    color: #64748b;
    font-size: 11px;
}

/* Main Area */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
}

.topbar-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.admin-flash-container {
    padding: 16px 28px 0;
}

/* Cards */
.card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 32px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    padding: 12px 18px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.table-title-link {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    font-size: 14px;
}

.table-title-link:hover {
    color: var(--admin-primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-category {
    background: #f1f5f9;
    color: #475569;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: #ffffff;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    flex-wrap: wrap;
}

.tab-item {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-item.active {
    background: var(--admin-primary);
    color: #ffffff;
}

.filter-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #334155;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

.tab-item.active .filter-badge-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Admin Search & Filter Toolbar */
.admin-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-filter-bar {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.admin-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 240px;
    flex: 1;
    max-width: 360px;
}

.search-input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
    font-size: 14px;
}

.admin-search-input {
    padding-left: 34px !important;
    height: 38px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: #ffffff;
    width: 100%;
}

.admin-select-filter {
    height: 38px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    cursor: pointer;
    min-width: 160px;
}

.admin-select-filter:focus,
.admin-search-input:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    outline: none;
}

/* Pagination Bar Below Table (15 records/page) */
.admin-pagination-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #ffffff;
    border-top: 1px solid var(--admin-border);
    border-radius: 0 0 8px 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: #64748b;
}

.pagination-info strong {
    color: #0f172a;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-link:hover:not(.disabled):not(.active) {
    background: #f1f5f9;
    color: var(--admin-primary);
    border-color: #cbd5e1;
}

.page-link.active {
    background: var(--admin-primary);
    color: #ffffff;
    border-color: var(--admin-primary);
    cursor: default;
}

.page-link.disabled {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-link.page-dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #94a3b8;
    padding: 0 4px;
    min-width: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    outline: none;
    background: #ffffff;
    font-family: inherit;
    transition: border 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-control-lg {
    font-size: 18px;
    padding: 12px 16px;
    font-weight: 600;
}

.slug-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slug-prefix {
    background: #f1f5f9;
    border: 1px solid var(--admin-border);
    padding: 9px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    color: #64748b;
}

/* Editor Container */
.editor-container {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

/* Multi-Section Article Editor */
.editor-section-card {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.tool-code-card {
    border-color: #bfdbfe;
    background: #fcfdfe;
}

.editor-section-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--admin-border);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-code-card .editor-section-header {
    background: #f0f7ff;
    border-bottom-color: #dbeafe;
}

.section-title-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.section-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.section-badge-tool {
    background: #2563eb;
    color: #ffffff;
}

.section-heading {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.section-subtext {
    font-size: 12px;
    color: #64748b;
    margin: 3px 0 0 0;
}

.badge-optional {
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid #fde68a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-subtoolbar {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.editor-view-wrapper {
    position: relative;
    background: #ffffff;
}

.code-font {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    background: #fafbfc;
    color: #0f172a;
}

.dropdown-presets {
    position: relative;
}

.presets-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    z-index: 100;
    width: 320px;
    margin-top: 4px;
}

.presets-menu.show {
    display: block;
}

.presets-menu-item {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.presets-menu-item:last-child {
    border-bottom: none;
}

.presets-menu-item:hover {
    background: #eff6ff;
    color: var(--admin-primary);
}

.editor-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--admin-border);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    position: relative;
}

.tool-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.tool-btn:hover {
    background: #e2e8f0;
}

.btn-embed-tool {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--admin-primary);
}

.embed-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 180px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    width: 280px;
}

.embed-menu.show {
    display: block;
}

.embed-menu-item {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.embed-menu-item:hover {
    background: #eff6ff;
    color: var(--admin-primary);
}

.editor-tabs {
    display: flex;
    gap: 4px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    color: #64748b;
}

.tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.editor-textarea {
    border: none;
    border-radius: 0;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    resize: vertical;
}

.editor-preview-pane {
    padding: 18px 20px;
    min-height: 240px;
    max-height: 750px;
    overflow-y: auto;
    background: #ffffff;
}

/* Live Visual Editor & Preview Controls Bar */
.preview-mode-bar {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-mode-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-mode-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
}

.preview-mode-hint {
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-preview-action {
    background: #ffffff;
    border: 1px solid #93c5fd;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-preview-action:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* ContentEditable Visual Area */
.preview-editable-area {
    outline: none;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 16px 18px;
    min-height: 140px;
    background: #ffffff;
    cursor: text;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.7;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.preview-editable-area:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.article-short-description.preview-editable-area {
    min-height: 110px;
    font-size: 16px;
}

.article-long-description.preview-editable-area {
    min-height: 380px;
}

/* Empty placeholder for contenteditable */
.preview-editable-area:empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    font-style: italic;
    pointer-events: none;
    display: block;
}

/* Styled elements inside preview editor (for pasted/rendered rich content) */
.preview-editable-area h1,
.preview-editable-area h2,
.preview-editable-area h3,
.preview-editable-area h4 {
    color: #0f172a;
    margin-top: 18px;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.preview-editable-area h2 { font-size: 22px; border-bottom: 1px solid #f1f5f9; padding-bottom: 6px; }
.preview-editable-area h3 { font-size: 18px; }
.preview-editable-area p { margin-bottom: 14px; }
.preview-editable-area p.lead { font-size: 17px; color: #334155; font-weight: 500; }

.preview-editable-area ul,
.preview-editable-area ol {
    margin: 12px 0 16px 24px;
    padding-left: 8px;
}

.preview-editable-area li {
    margin-bottom: 6px;
}

.preview-editable-area blockquote {
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    color: #475569;
    font-style: italic;
}

.preview-editable-area table,
.preview-editable-area .table-styled {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
}

.preview-editable-area th,
.preview-editable-area td {
    border: 1px solid #cbd5e1;
    padding: 9px 13px;
    text-align: left;
}

.preview-editable-area th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
}

.preview-editable-area code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

.preview-editable-area pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0;
}

.preview-editable-area a {
    color: #2563eb;
    text-decoration: underline;
}

.preview-editable-area iframe,
.preview-editable-area video,
.preview-editable-area embed {
    max-width: 100%;
    box-sizing: border-box;
}

.preview-editable-area img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 14px 0;
    display: inline-block;
}

.editor-footer {
    background: #f8fafc;
    border-top: 1px solid var(--admin-border);
    padding: 6px 14px;
}

/* Layouts */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
}

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

.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Category Table Edit Highlights */
.row-editing {
    background-color: #eff6ff !important;
    border-left: 3px solid #2563eb;
}

.row-editing td {
    background-color: #eff6ff !important;
    border-bottom-color: #bfdbfe !important;
}

.btn-edit-category {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
    transition: all 0.15s ease;
}

.btn-edit-category:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--admin-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--admin-primary-hover);
}

.btn-outline {
    background: #ffffff;
    border-color: var(--admin-border);
    color: var(--admin-text);
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
}

.btn-block {
    width: 100%;
}

/* Login Page */
body.login-body {
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.login-logo {
    font-size: 40px;
    text-align: center;
    margin-bottom: 8px;
}

.login-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    color: #0f172a;
}

.login-subtitle {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
}

.login-demo-note {
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    text-align: center;
    margin-top: 18px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}

/* Helper utilities */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.p-0 { padding: 0 !important; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.text-muted { color: #64748b; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-danger { color: #ef4444; }
.font-bold { font-weight: 700; }
.font-normal { font-weight: 400; }

/* Thumbnail & Upload Dropzone Utilities */
.upload-dropzone .dropzone-content:hover {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

.thumb-preview-frame {
    transition: all 0.2s ease;
}

.thumb-preview-frame:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================
   Inline Image & Icon Upload Tool Styles
   ========================================== */
.btn-inline-img-btn {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-inline-img-btn:hover {
    background: #dcfce7 !important;
    border-color: #4ade80 !important;
}

.inline-img-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.inline-img-modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.inline-img-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.inline-img-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.inline-img-modal-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.inline-img-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}

.inline-img-modal-close:hover {
    color: #0f172a;
}

.inline-img-modal-body {
    padding: 20px;
    flex: 1;
}

.inline-img-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-img-dropzone:hover,
.inline-img-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.inline-img-style-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.style-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.style-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.style-pill.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.style-pill input {
    margin: 0;
}

.inline-img-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

