:root {
    --bg-color: #0d1117;
    --sidebar-bg: #161b22;
    --card-bg: rgba(22, 27, 34, 0.7);
    --card-hover: rgba(48, 54, 61, 0.8);
    --text-color: #f0f6fc;
    --text-muted: #8b949e;
    --accent: #238636;
    /* Verde Kontroly Principal */
    --accent-glow: rgba(35, 134, 54, 0.15);
    --positive: #3fb950;
    --negative: #f85149;
    --highlight: #58a6ff;
    --border-color: #30363d;
    --radius: 12px;
    --sidebar-width: 260px;
    --transition: all 0.25s ease;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    line-height: 1.6;
}

/* --- LOGIN SCREEN (FIXING CENTERING) --- */
.login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #161b22 0%, #0d1117 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-glow {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    z-index: -1;
}

.login-glow-1 {
    top: -10%;
    left: -10%;
    background: var(--accent);
}

.login-glow-2 {
    bottom: -10%;
    right: -10%;
    background: var(--highlight);
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    width: 420px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(63, 185, 80, 0.2));
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    /* Fundo mais claro para contraste */
    border: 2px solid rgba(63, 185, 80, 0.5);
    /* Borda verde mais forte e permanente */
    border-radius: 14px;
    padding: 2px 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.input-wrapper:focus-within {
    border-color: #3fb950;
    background: rgba(63, 185, 80, 0.12);
    box-shadow: 0 0 0 5px rgba(63, 185, 80, 0.25);
}

.input-wrapper i {
    color: #3fb950;
    margin-right: 1rem;
    width: 20px;
    height: 20px;
}

/* Inputs DENTRO de .input-wrapper ficam sem fundo/borda redundante */
.input-wrapper input,
.input-wrapper select {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.8rem 0;
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.btn-primary:hover {
    border-radius: 14px;
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.login-footer {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dev-footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dev-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* --- APP WRAPPER --- */
.app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: var(--bg-color);
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.sidebar-header h2 span {
    color: var(--accent);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 0.2rem;
}

.nav-item:hover {
    color: var(--text-color);
    background: var(--glass);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-logout-premium {
    width: 100%;
    background: rgba(248, 81, 73, 0.1);
    color: var(--negative);
    border: 1px solid rgba(248, 81, 73, 0.2);
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.btn-logout-premium:hover {
    background: var(--negative);
    color: white;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-color);
}

.content-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.tab-content {
    display: none !important;
}

.tab-content.active {
    display: block !important;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- DASHBOARD ELEMENTS --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

/* Individual Card Colors (Borders) */
.total-hoje {
    border-left: 4px solid #10b981;
}

.total-semana {
    border-left: 4px solid #3b82f6;
}

.total-mes {
    border-left: 4px solid #f59e0b;
}

.total-despesas {
    border-left: 4px solid #ef4444;
}

.total-entradas {
    border-left: 4px solid #8b5cf6;
}

.total-ticket {
    border-left: 4px solid #ec4899;
}

.stat-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-card .card-header i,
.type-indicator i,
.category-badge i,
.profile-badge i,
#connection-header-icon,
.main-status-icon,
[data-lucide] {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    border: none !important;
}

.total-hoje .card-header i {
    color: #10b981 !important;
}

.total-semana .card-header i {
    color: #3b82f6 !important;
}

.total-mes .card-header i {
    color: #f59e0b !important;
}

.total-despesas .card-header i {
    color: #ef4444 !important;
}

.total-entradas .card-header i {
    color: #8b5cf6 !important;
}

.total-ticket .card-header i {
    color: var(--accent) !important;
}

.header-actions button,
.header-actions button i,
.btn-theme-toggle,
.btn-refresh {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--accent) !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

.header-actions button:hover,
.header-actions button:hover i {
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.1);
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 800;
}

.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    height: 420px !important;
    position: relative;
}

/* --- FILTERS (HORIZONTAL) --- */
.filters {
    display: flex;
    flex-direction: row !important;
    gap: 0.75rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.table-filter {
    background: var(--bg-color) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    min-width: 140px;
    font-size: 0.85rem;
}

#history-search {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border-radius: 8px;
    width: 100%;
}

/* --- MODALS --- */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.admin-modal-content {
    background: #161b22;
    border: 1px solid rgba(63, 185, 80, 0.25);
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(63, 185, 80, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px 16px;
    border-bottom: 1px solid rgba(63, 185, 80, 0.15);
    gap: 16px;
}

.admin-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.3px;
}

.admin-modal-header p {
    color: rgba(139, 148, 158, 0.9);
    font-size: 0.82rem;
    margin-top: 5px;
    line-height: 1.5;
}

.admin-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.admin-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: rotate(90deg);
}

.admin-modal-close svg,
.admin-modal-close i {
    width: 16px;
    height: 16px;
}

.modal-body .form-group {
    margin-bottom: 1.25rem;
}

.modal-body label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.92rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.modal-body input:focus,
.modal-body textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.06);
}

.modal-body textarea {
    resize: vertical;
    min-height: 90px;
}

.confirm-modal-content {
    max-width: 420px;
    text-align: center;
}

.confirm-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(248, 81, 73, 0.12);
    border: 2px solid rgba(248, 81, 73, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f85149;
    margin-bottom: 0.5rem;
}

.confirm-icon-wrapper svg,
.confirm-icon-wrapper i {
    width: 28px !important;
    height: 28px !important;
    color: #f85149 !important;
}

.confirm-modal-content .btn {
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.confirm-modal-content .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted);
}

.confirm-modal-content .btn-danger {
    background: #f85149;
    color: white;
}

.confirm-modal-content .btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ====================================================
   REDESIGN - PERFIS PREMIUM
   ==================================================== */

.profiles-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.profiles-page-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.btn-new-profile-minimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(35, 134, 54, 0.12);
    color: #3fb950;
    border: 1px solid rgba(35, 134, 54, 0.3);
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-new-profile-minimal:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-new-profile-minimal svg,
.btn-new-profile-minimal i {
    width: 16px !important;
    height: 16px !important;
    color: inherit !important;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.profile-card-premium {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(13, 17, 23, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    cursor: default;
}

.profile-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-card-premium:hover {
    border-color: rgba(35, 134, 54, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(35, 134, 54, 0.2);
}

.profile-card-premium:hover::before {
    opacity: 1;
}

.profile-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(35, 134, 54, 0.12);
    border: 1px solid rgba(35, 134, 54, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3fb950;
    flex-shrink: 0;
}

.profile-card-icon svg,
.profile-card-icon i {
    width: 20px !important;
    height: 20px !important;
    color: inherit !important;
}

.profile-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.profile-card-title h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 4px 0;
}

.profile-card-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.profile-card-count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(35, 134, 54, 0.1);
    border: 1px solid rgba(35, 134, 54, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.profile-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-manage-cat {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(35, 134, 54, 0.1);
    color: #3fb950;
    border: 1px solid rgba(35, 134, 54, 0.25);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-manage-cat:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-manage-cat svg,
.btn-manage-cat i {
    width: 14px !important;
    height: 14px !important;
    color: inherit !important;
}

.btn-delete-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 81, 73, 0.08);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.2);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-delete-premium:hover {
    background: rgba(248, 81, 73, 0.2);
    transform: scale(1.05);
}

.btn-delete-premium svg,
.btn-delete-premium i {
    width: 16px !important;
    height: 16px !important;
    color: #f85149 !important;
}

/* ====================================================
   REDESIGN - CONEXÃO PREMIUM
   ==================================================== */

.connection-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
}

.connection-card {
    border-radius: 24px !important;
    padding: 2.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.98) 0%, rgba(13, 17, 23, 0.9) 100%) !important;
}

.connection-status-hero {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.status-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(248, 81, 73, 0.1);
    border: 2px solid rgba(248, 81, 73, 0.3);
    animation: ripplePulse 2.5s infinite;
}

.connection-layout.online .ripple {
    background: rgba(35, 134, 54, 0.1);
    border-color: rgba(35, 134, 54, 0.35);
}

@keyframes ripplePulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }

    70% {
        transform: scale(1.25);
        opacity: 0.2;
    }

    100% {
        transform: scale(0.9);
        opacity: 1;
    }
}

.main-status-icon {
    font-size: 2.5rem;
    width: 56px !important;
    height: 56px !important;
    color: #f85149 !important;
    z-index: 1;
    position: relative;
}

.connection-layout.online .main-status-icon {
    color: #3fb950 !important;
}

.connection-status-hero h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.connection-status-hero p {
    color: var(--text-muted);
    max-width: 380px;
}

.connection-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin: 0.5rem 0 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.detail-item .val {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-color);
}

.connection-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.connection-actions .btn-primary,
.connection-actions .btn-danger,
.connection-actions .btn-secondary {
    flex: 1;
    min-width: 160px;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
}

.connection-actions .btn-primary {
    background: var(--accent);
    color: white;
}

.connection-actions .btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.connection-actions .btn-danger {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.3) !important;
}

.connection-actions .btn-danger:hover {
    background: #f85149;
    color: white;
}

.connection-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-color) !important;
}

.connection-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.connection-actions svg,
.connection-actions i {
    width: 18px !important;
    height: 18px !important;
    color: inherit !important;
}

/* ====================================================
   REDESIGN - ADMIN STATS CENTRALIZADAS
   ==================================================== */

.admin-stats-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    justify-content: center;
}

.admin-stats-row .stat-card {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: 1.75rem 1.5rem;
}

.admin-stats-row .card-header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* ====================================================
   REDESIGN - BTN STYLES GLOBAL
   ==================================================== */

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.btn-danger {
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.25);
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger:hover {
    background: #f85149;
    color: white;
}

/* ====================================================
   SIDEBAR FOOTER PREMIUM REDESIGN
   ==================================================== */

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* User Block */
.sidebar-user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #3fb950);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sidebar-settings-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-settings-btn:hover {
    background: var(--glass);
    color: var(--text-color);
}

.sidebar-settings-btn svg,
.sidebar-settings-btn i {
    width: 16px;
    height: 16px;
}

/* Dev Badge */
.sidebar-dev-footer {
    padding: 0;
}

.sidebar-dev-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.sidebar-dev-badge svg,
.sidebar-dev-badge i {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sidebar-dev-badge>div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-dev-agency {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
}

.sidebar-dev-dev {
    font-size: 0.7rem;
    color: var(--accent);
    text-decoration: none;
    line-height: 1.3;
}

.sidebar-dev-dev:hover {
    text-decoration: underline;
}

/* ====================================================
   DASHBOARD: PROFILE CARD ARROW BUTTON (NO WHITE BG)
   ==================================================== */

.btn-dash-arrow {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: inherit;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-dash-arrow svg,
.btn-dash-arrow i {
    width: 14px;
    height: 14px;
    color: inherit;
}

.btn-dash-arrow:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

/* Category preview chips inside dashboard profile cards */
.profile-dash-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0 4px;
}

.profile-dash-cat-chip {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    white-space: nowrap;
}

/* ====================================================
   CHART SECTION HEADER - FILTERS CENTERED
   ==================================================== */

.chart-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 2rem 0 1rem;
    text-align: center;
}

.chart-filters-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ====================================================
   PROFILES EMPTY STATE WITH TIPS
   ==================================================== */

.profiles-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.profiles-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 2px solid rgba(35, 134, 54, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.profiles-empty-icon svg,
.profiles-empty-icon i {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

.profiles-empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.profiles-empty-state>p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.profiles-empty-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-width: 420px;
    margin: 0 auto;
}

.profiles-empty-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.profiles-empty-step strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 2px;
}

.profiles-empty-step p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ====================================================
   FORM GROUP - PREMIUM INPUT STYLING
   ==================================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ffffff;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(63, 185, 80, 0.51);
    border-radius: 14px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 1.1rem;
    font-family: inherit;
    transition: var(--transition);
    width: 100%;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3fb950 !important;
    background: rgba(63, 185, 80, 0.12) !important;
    box-shadow: 0 0 0 6px rgba(63, 185, 80, 0.2) !important;
    transform: none;
}

/* ====================================================
   GLOBAL TOPBAR PREMIUM
   ==================================================== */

.global-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.topbar-title-block h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--positive);
}

.pulse-green {
    box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(63, 185, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(63, 185, 80, 0);
    }
}

.status-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-topbar-action {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-topbar-action:hover {
    background: var(--glass-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.btn-topbar-action i {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.topbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
}

.btn-theme-toggle-premium {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-theme-toggle-premium:hover {
    background: var(--glass);
    color: var(--highlight);
}

.theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-sun {
    display: block;
}

[data-theme="light"] .theme-icon-moon {
    display: none;
}

/* ====================================================
   PREMIUM MODAL INPUTS & FORMS
   ==================================================== */

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-with-icon,
.textarea-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(63, 185, 80, 0.45);
    border-radius: 14px;
    padding: 4px 16px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.input-with-icon:focus-within,
.textarea-with-icon:focus-within {
    border-color: #3fb950;
    background: rgba(63, 185, 80, 0.1);
    box-shadow: 0 0 0 5px rgba(63, 185, 80, 0.2);
}

.input-with-icon>i,
.textarea-with-icon>i {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
    color: #3fb950 !important;
    pointer-events: none;
}

.input-with-icon input,
.textarea-with-icon textarea {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 500;
    padding: 12px 0 !important;
    width: 100% !important;
    box-shadow: none !important;
}

.input-with-icon input::placeholder,
.textarea-with-icon textarea::placeholder {
    color: rgba(139, 148, 158, 0.7);
}

.premium-input input:focus+i,
.premium-input textarea:focus+i {
    color: var(--accent);
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    font-size: 1rem;
}

.ia-instruction-highlight {
    font-size: 0.9rem;
    color: #3fb950;
    font-weight: 800;
    margin-top: 15px;
    display: block;
    padding: 12px 16px;
    background: rgba(63, 185, 80, 0.1);
    border-radius: 12px;
    border-left: 4px solid #3fb950;
    line-height: 1.5;
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Admin Privilege Card */
.admin-privilege-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(35, 134, 54, 0.05);
    border: 1px solid rgba(35, 134, 54, 0.2);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.privilege-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--positive);
    margin-bottom: 4px;
}

.privilege-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Switch Premium */
.switch-premium {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-premium input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-premium {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.slider-premium:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-premium {
    background-color: var(--accent);
}

input:checked+.slider-premium:before {
    transform: translateX(20px);
}

/* Actions */
.modal-actions-premium {
    display: flex;
    gap: 12px;
}

.btn-modal-primary {
    flex: 1.5;
    background: linear-gradient(135deg, var(--accent), #1e6b2b);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(35, 134, 54, 0.4);
    filter: brightness(1.1);
}

.btn-modal-secondary {
    flex: 1;
    background: var(--glass);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-modal-secondary:hover {
    background: var(--glass-hover);
    color: var(--text-color);
}

/* Fix for profile dash icons background */
.btn-dash-arrow {
    background: transparent !important;
}

.btn-dash-arrow:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}


.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* ====================================================
   BADGES DE STATUS PREMIUM
   ==================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ATIVO: fundo verde sólido, texto branco */
.badge-success {
    background: #3fb950;
    color: #ffffff;
    border: none;
}

/* BLOQUEADO: fundo vermelho sólido, texto branco */
.badge-danger {
    background: #f85149;
    color: #ffffff;
    border: none;
}

.badge-warning {
    background: #f0883e;
    color: #ffffff;
    border: none;
}

/* (duplicate removed - rules defined above) */

/* Modal body + form layout */
.admin-modal-content .modal-body {
    padding: 24px 28px;
}

.admin-modal-content .form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-modal-content .form-group label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(139, 148, 158, 0.9);
    margin-bottom: 8px;
    display: block;
}

.admin-modal-content .modal-actions-premium {
    padding: 20px 28px;
    border-top: 1px solid rgba(63, 185, 80, 0.1);
    display: flex;
    gap: 12px;
}

.input-tip {
    font-size: 0.78rem;
    color: rgba(139, 148, 158, 0.8);
    margin-top: 8px;
    display: block;
    line-height: 1.5;
    padding-left: 4px;
}

/* ====================================================
   UTILITÁRIOS DE COR DE VALOR (HISTÓRICO)
   ==================================================== */

/* Valor positivo (entrada) = verde */
.text-positive {
    color: #3fb950 !important;
    font-weight: 700;
}

/* Valor negativo (despesa/saída) = vermelho */
.text-negative {
    color: #f85149 !important;
    font-weight: 700;
}

.text-accent {
    color: var(--accent) !important;
}

.text-highlight {
    color: var(--highlight) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ====================================================
   BOTÕES DE FILTRO DO GRÁFICO (FLUXO GERAL)
   ==================================================== */

.chart-btn-group {
    display: flex;
    background: var(--bg-sidebar, #161b22);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(48, 54, 61, 1));
}

.btn-chart-filter {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-chart-filter.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-chart-filter:hover:not(.active) {
    background: var(--glass);
    color: var(--text-color);
}

/* ====================================================
   BOTÕES DE AÇÃO NA TABELA DE ADMIN
   ==================================================== */

.btn-action-minimal {
    background: transparent !important;
    border: none !important;
    color: var(--accent) !important;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action-minimal:hover {
    background: rgba(63, 185, 80, 0.1) !important;
    transform: scale(1.1);
}

.btn-action-minimal svg,
.btn-action-minimal i {
    width: 16px !important;
    height: 16px !important;
    color: inherit !important;
}

.btn-delete-red {
    background: rgba(248, 81, 73, 0.1) !important;
    border: 1px solid rgba(248, 81, 73, 0.2) !important;
    color: #f85149 !important;
    cursor: pointer;
    padding: 6px 9px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-red:hover {
    background: rgba(248, 81, 73, 0.25) !important;
    transform: scale(1.05);
}

.btn-delete-red svg,
.btn-delete-red i {
    color: #f85149 !important;
    width: 16px !important;
    height: 16px !important;
}

/* ====================================================
   ADMIN STAT CARD ICONS - MANTER CORES ORIGINAIS
   ==================================================== */

/* Garante que ícones dentro dos stat cards mantenham suas cores customizadas */
.stat-card i[style*="color"],
.card i[style*="color"] {
    color: inherit !important;
    /* respeita o inline style */
}

/* ====================================================
   AJUSTES FINAIS - LOGO E TOPBAR DINÂMICO
   ==================================================== */

.sidebar-logo-img {
    max-width: 140px;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}

.topbar-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 2px 0 4px;
    font-weight: 500;
}

.topbar-tab-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-tab-actions .btn-primary {
    width: auto !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ====================================================
   CATEGORIAS - CARDS PREMIUM
   ==================================================== */

.category-chip-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

.category-premium-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: all 0.2s ease;
}

.category-premium-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(63, 185, 80, 0.3);
    transform: translateX(4px);
}

.cat-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(63, 185, 80, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3fb950;
    flex-shrink: 0;
}

.cat-card-content {
    flex: 1;
    min-width: 0;
}

.cat-card-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.cat-card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cat-keyword-tag {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-cat-delete-premium {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.btn-cat-delete-premium:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    opacity: 1;
}

/* ====================================================
   COLOR PICKER - MODAL DE PERFIL
   ==================================================== */

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    outline: none;
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}

.color-custom-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.15s;
}

.color-custom-label:hover {
    color: var(--highlight);
}

.color-custom-input {
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
}

.color-preview-bar {
    height: 4px;
    border-radius: 4px;
    margin-top: 10px;
    transition: background 0.2s ease;
    width: 100%;
}

/* ====================================================
   CARDS DE PERFIL COLORIDOS
   ==================================================== */

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.profile-card-premium {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.profile-card-premium:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile-card-color-bar {
    height: 4px;
    width: 100%;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 12px;
}

.profile-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-card-icon i {
    width: 20px;
    height: 20px;
}

.profile-card-title {
    flex: 1;
    min-width: 0;
}

.profile-card-title h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
}

.profile-card-title p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-count {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.profile-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 14px;
}

.profile-cat-chip {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid;
    font-weight: 500;
}

.profile-cat-more {
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
}

.profile-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-manage-cat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-manage-cat:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-manage-cat i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.btn-view-history {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-view-history:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn-view-history i {
    width: 16px;
    height: 16px;
}

.btn-delete-premium {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-delete-premium:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-delete-premium i {
    width: 16px;
    height: 16px;
}