/* ── ACE DASHBOARD — Light Theme (consistent cu site-ul) ─────────────────── */

body.ace-dashboard {
    background: #f4f4f6;
    color: #1a1a1a;
}

.ace-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f4f4f6;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.ace-sidebar {
    width: 240px;
    min-height: 100vh;
    background: #ffffff;
    border-right: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
}

.ace-logo {
    display: block;
    margin-bottom: 40px;
    padding: 0 8px;
}

.ace-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.ace-nav li + li {
    margin-top: 4px;
}

.ace-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(0,0,0,0.55);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
}

.ace-nav-link:hover {
    background: rgba(0,0,0,0.05);
    color: #1a1a1a;
}

.ace-nav-link.active {
    background: rgba(124,58,237,0.08);
    color: #7c3aed;
}

.ace-nav-link.text-danger {
    color: #dc2626 !important;
}

.ace-nav-link.text-danger:hover {
    background: rgba(220,38,38,0.06);
}

.ace-sidebar-footer {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 16px;
    margin-top: 16px;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.ace-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ace-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: #ffffff;
}

.ace-page-title {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
}

.ace-topbar-right .text-body-3 {
    color: rgba(0,0,0,0.55) !important;
    font-size: 13px;
}

.ace-content {
    padding: 32px;
    flex: 1;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.ace-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.ace-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ace-card-header h5,
.ace-card-header .fw-semibold {
    color: #1a1a1a !important;
}

.ace-card-body {
    padding: 24px;
}

.ace-card-body p,
.ace-card-body label {
    color: rgba(0,0,0,0.6) !important;
}

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.ace-stat-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ace-stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(124,58,237,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #7c3aed;
    flex-shrink: 0;
}

.ace-stat-body p {
    color: rgba(0,0,0,0.55);
    font-size: 13px;
    margin-bottom: 4px;
}

.ace-stat-body h3 {
    color: #1a1a1a;
    margin-bottom: 0;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.ace-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ace-table th {
    text-align: left;
    padding: 12px 16px;
    color: rgba(0,0,0,0.45);
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    white-space: nowrap;
    background: #f9f9fb;
}

.ace-table td {
    padding: 14px 16px;
    color: #1a1a1a;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: middle;
}

.ace-table tr:last-child td {
    border-bottom: none;
}

.ace-table tr:hover td {
    background: rgba(0,0,0,0.02);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge-status,
.badge-plan {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-status.active   { background: rgba(34,197,94,0.10);  color: #16a34a; }
.badge-status.revoked  { background: rgba(239,68,68,0.10);  color: #dc2626; }
.badge-status.expired  { background: rgba(107,114,128,0.10); color: #6b7280; }
.badge-status.inactive { background: rgba(107,114,128,0.10); color: #6b7280; }

.badge-plan.BASIC      { background: rgba(124,58,237,0.08); color: #7c3aed; }
.badge-plan.PRO        { background: rgba(245,158,11,0.10); color: #d97706; }
.badge-plan.ENTERPRISE { background: rgba(16,185,129,0.10); color: #059669; }

/* ── Text utilities ──────────────────────────────────────────────────────── */
.ace-wrapper .text-white-64,
.ace-wrapper .text-white {
    color: rgba(0,0,0,0.55) !important;
}

.ace-wrapper .fw-semibold {
    color: #1a1a1a;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ace-wrapper .tf-btn {
    background: #7c3aed;
    color: #ffffff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ace-wrapper .tf-btn:hover {
    background: #6d28d9;
    color: #ffffff !important;
}

.ace-wrapper .tf-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.ace-wrapper .tf-btn-outline {
    background: transparent;
    color: #7c3aed !important;
    border: 1px solid #7c3aed;
}

.ace-wrapper .tf-btn-outline:hover {
    background: rgba(124,58,237,0.06);
}

/* ── Modals ──────────────────────────────────────────────────────────────── */
.ace-wrapper .modal-content {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
}

.ace-wrapper .modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ace-wrapper .modal-footer {
    border-top: 1px solid rgba(0,0,0,0.08);
}

.ace-wrapper .modal-title {
    color: #1a1a1a !important;
}

.ace-wrapper .form-control {
    background: #f9f9fb;
    border: 1px solid rgba(0,0,0,0.12);
    color: #1a1a1a;
    border-radius: 8px;
}

.ace-wrapper .form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
    background: #ffffff;
}

.ace-wrapper .font-monospace {
    background: #f4f4f6 !important;
    color: #6d28d9 !important;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.ace-wrapper .alert-danger {
    background: rgba(220,38,38,0.06);
    border: 1px solid rgba(220,38,38,0.2);
    color: #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 32px 0;
}

.ace-wrapper .alert-success {
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.2);
    color: #16a34a;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 32px 0;
}

/* ── Profile incomplete banner ───────────────────────────────────────────── */
.ace-wrapper [style*="rgba(251,191,36"] {
    background: rgba(251,191,36,0.06) !important;
    border-color: rgba(251,191,36,0.3) !important;
}

/* ── Code snippets ───────────────────────────────────────────────────────── */
.ace-wrapper code {
    background: rgba(124,58,237,0.06);
    color: #7c3aed;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ace-sidebar {
        display: none;
    }
    .ace-content {
        padding: 16px;
    }
    .ace-topbar {
        padding: 16px;
    }
}

/* ── Blog Content — override stiluri inline din articolele migrate ────────── */
.blog-content * {
    color: #1a1a1a !important;
    background-color: transparent !important;
}

.blog-content blockquote,
.blog-content blockquote * {
    color: #444444 !important;
    border-left: 3px solid #7c3aed;
    padding-left: 16px;
    margin: 16px 0 16px 0;
    font-style: italic;
}

.blog-content a,
.blog-content a * {
    color: #7c3aed !important;
}

.blog-content strong,
.blog-content b,
.blog-content strong *,
.blog-content b * {
    color: #000000 !important;
    font-weight: 700 !important;
}

.blog-content h1, .blog-content h1 *,
.blog-content h2, .blog-content h2 *,
.blog-content h3, .blog-content h3 *,
.blog-content h4, .blog-content h4 *,
.blog-content h5, .blog-content h5 *,
.blog-content h6, .blog-content h6 * {
    color: #0f0f0f !important;
}

.blog-content code,
.blog-content pre,
.blog-content code *,
.blog-content pre * {
    background: rgba(0,0,0,0.05) !important;
    color: #6d28d9 !important;
}

.blog-content img {
    max-width: 100%;
    border-radius: 8px;
}

.blog-content li {
    margin-bottom: 6px;
}

/* ── Blog listing & paginare ─────────────────────────────────────────────── */
.section-blog .text-white-64,
.blog-sidebar .text-white-64,
.article-content .text-white-64 {
    color: rgba(0,0,0,0.55) !important;
}

.article-title a {
    color: #1a1a1a !important;
}

.article-title a:hover {
    color: #7c3aed !important;
}

.tf-pagination .pagination-item {
    color: #1a1a1a !important;
}

.tf-pagination .pagination-item.active {
    color: #ffffff !important;
}

/* ── Modals — text vizibil ── */
.modal-content {
    color: #1a1a1a !important;
}

.modal-content h5,
.modal-content h4,
.modal-content p,
.modal-content label,
.modal-content .modal-title {
    color: #1a1a1a !important;
}

.modal-content code,
.modal-content pre,
.modal-content .font-monospace {
    color: #6d28d9 !important;
    background: rgba(124,58,237,0.06) !important;
}

/* ── Dashboard modals — forțat dark indiferent de temă ── */
.ace-wrapper .modal-content.bg-dark {
    background-color: #1a1a2e !important;
    color: #ffffff !important;
}

.ace-wrapper .modal-content.bg-dark .text-white {
    color: #ffffff !important;
}

.ace-wrapper .modal-content.bg-dark .text-white-64 {
    color: rgba(255,255,255,0.64) !important;
}

.ace-wrapper .modal-content.bg-dark .form-control {
    color: #ffffff !important;
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.12) !important;
}

.ace-wrapper .modal-content.bg-dark label {
    color: rgba(255,255,255,0.87) !important;
}

.ace-wrapper .border-white-8 {
    border-color: rgba(255,255,255,0.08) !important;
}