/* =====================================================
   RX PRULE - Admin Panel
   Developer: RonnyyApp
   Sidebar layout baseado no index.php existente
   ===================================================== */

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

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --bg: #f5f3ff;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #4a4565;
    --text-muted: #8b83a8;
    --border: #e5e0f0;
    --danger: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 8px;
    --transition: all 0.2s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
}

/* =====================================================
   LOGIN
   ===================================================== */
.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    padding: 1rem;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 50px;
    margin-bottom: 0.75rem;
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.login-logo p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.login-error {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px solid #fecaca;
    border-left: 4px solid var(--danger);
    color: #991b1b;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    animation: loginErrorSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}
.login-error i { font-size: 18px; color: var(--danger); flex-shrink: 0; margin-top: 1px; }
.login-error .error-content { flex: 1; }
.login-error .error-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.15rem; color: #7f1d1d; }
.login-error .error-detail { font-size: 0.78rem; color: #991b1b; line-height: 1.4; }
.login-error .error-close { background: none; border: none; color: #b91c1c; cursor: pointer; font-size: 16px; padding: 0; flex-shrink: 0; opacity: 0.6; transition: opacity 0.2s; }
.login-error .error-close:hover { opacity: 1; }

@keyframes loginErrorSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shake no formulario quando erro */
@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.login-field.error input { border-color: var(--danger) !important; animation: loginShake 0.5s; }
.login-field.error > i { color: var(--danger) !important; }

.login-field {
    position: relative;
    margin-bottom: 1.25rem;
}

.login-field > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.login-field input {
    width: 100%;
    padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.login-field input:focus {
    border-color: var(--primary);
}

.login-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

.login-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-top: 0.5rem;
}

.login-submit:hover { background: var(--primary-dark); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.login-back {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: var(--transition);
}
.login-back:hover { color: var(--primary); }

/* =====================================================
   PANEL LAYOUT
   ===================================================== */
.panel-view { min-height: 100vh; }

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

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
    width: 250px;
    min-width: 250px;
    background: var(--sidebar-bg);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 1.25rem 0.75rem;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-logo span {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.04em;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    margin: 0 0.75rem 0.5rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.sidebar-user > i {
    font-size: 24px;
    color: var(--primary);
}

.sidebar-user div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user small {
    font-size: 0.7rem;
    color: var(--primary-light);
    font-weight: 600;
}

.sidebar-menu {
    flex: 1;
    padding: 0.25rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(124, 58, 237, 0.06);
    color: var(--primary);
}

.sidebar-link.active {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link i { font-size: 16px; width: 18px; text-align: center; }

.sidebar-sep {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 1rem;
}

/* Sidebar dropdown groups */
.sidebar-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-group-title:hover { background: rgba(124,58,237,0.06); color: var(--primary); }
.sidebar-group-title span { display: flex; align-items: center; gap: 0.6rem; }
.sidebar-group-title i.arrow { font-size: 12px; transition: transform 0.2s; }
.sidebar-group.open .sidebar-group-title i.arrow { transform: rotate(180deg); }
.sidebar-group-items { display: none; padding-left: 1rem; }
.sidebar-group.open .sidebar-group-items { display: block; }

.sidebar-bottom {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.sidebar-logout { color: var(--danger) !important; }
.sidebar-logout:hover { background: rgba(220,38,38,0.06) !important; }

/* =====================================================
   CONTENT
   ===================================================== */
.content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--card-bg);
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    margin: 0.75rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}

.topbar-credits {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(124,58,237,0.08);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
}

.content {
    padding: 0 0.75rem 1.5rem;
    flex: 1;
}

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: var(--transition);
}

.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.purple { background: rgba(124,58,237,0.1); color: var(--primary); }
.stat-icon.green  { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.red    { background: rgba(220,38,38,0.1);  color: var(--danger); }

.stat-info { min-width: 0; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Page placeholder */
.page-placeholder {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.page-placeholder i { font-size: 48px; color: var(--border); margin-bottom: 1rem; display: block; }
.page-placeholder h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
.page-placeholder p { font-size: 0.85rem; color: var(--text-muted); }

/* =====================================================
   DATA TABLES
   ===================================================== */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.table-search {
    flex: 1;
    min-width: 180px;
    padding: 0.55rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}
.table-search:focus { border-color: var(--primary); }
.table-search::placeholder { color: var(--text-muted); }
.btn { padding: 0.55rem 1.1rem; border: none; border-radius: var(--radius); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.data-table-wrap {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.data-table th {
    background: var(--primary);
    color: #fff;
    padding: 0.7rem 0.85rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.data-table td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(124,58,237,0.03); }
.data-table .actions { display: flex; gap: 0.35rem; }
.data-table .no-data { text-align: center; color: var(--text-muted); padding: 2rem !important; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem;
}
.pagination button {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.pagination .pg-info { font-size: 0.75rem; color: var(--text-muted); margin: 0 0.5rem; }

/* =====================================================
   FORM CARDS
   ===================================================== */
.form-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    max-width: 520px;
}
.form-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--border);
}
.form-row {
    margin-bottom: 1.1rem;
}
.form-row label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--text);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-row select { cursor: pointer; }
.form-row textarea { resize: vertical; min-height: 80px; }
.form-row .hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-actions { margin-top: 1.25rem; display: flex; gap: 0.5rem; }

/* =====================================================
   ALERTS & BADGES
   ===================================================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.84rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-ativo, .badge-sucesso { background: #d1fae5; color: #065f46; }
.badge-inativo, .badge-falha { background: #fee2e2; color: #991b1b; }
.badge-expirado { background: #fef3c7; color: #92400e; }
.badge-sem-licenca { background: #e5e7eb; color: #4b5563; }
.badge-supremo { background: #fef3c7; color: #92400e; }
.badge-revenda { background: #ede9fe; color: #6d28d9; }

/* =====================================================
   LOADING & EMPTY
   ===================================================== */
.loading { display: flex; align-items: center; justify-content: center; padding: 3rem; color: var(--text-muted); font-size: 0.88rem; gap: 0.5rem; }
.loading::before { content: ''; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 40px; display: block; margin-bottom: 0.75rem; color: var(--border); }
.empty-state p { font-size: 0.88rem; }

/* Result card */
.result-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-top: 1rem;
}
.result-card .result-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; }
.result-card .result-row:last-child { border-bottom: none; }
.result-card .result-key { color: var(--text-muted); }
.result-card .result-val { font-weight: 600; color: var(--text); }

/* Saldo card */
.saldo-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    text-align: center;
    margin-bottom: 1rem;
}
.saldo-card .saldo-value { font-size: 3rem; font-weight: 800; line-height: 1; }
.saldo-card .saldo-label { font-size: 0.88rem; opacity: 0.85; margin-top: 0.35rem; }

/* =====================================================
   PROFILE SWITCHER (topbar)
   ===================================================== */
.profile-switcher { position: relative; }
.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
}
.profile-btn:hover { background: rgba(124,58,237,0.15); }
.profile-count { background: var(--primary); color: #fff; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; }

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 500;
    overflow: hidden;
}
.profile-dropdown.open { display: block; animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }

.profile-dropdown-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.65rem 0.85rem 0.35rem;
}
.profile-dropdown-sep { height: 1px; background: var(--border); margin: 0.25rem 0; }

.profile-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.84rem;
}
.profile-item:hover { background: rgba(124,58,237,0.06); }
.profile-item > i { font-size: 18px; }
.profile-item-info { display: flex; flex-direction: column; min-width: 0; }
.profile-item-name { font-weight: 600; color: var(--text); font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-item-type { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }
.profile-item-add { color: var(--primary); }
.profile-item-add span { font-weight: 600; }

/* =====================================================
   PROFILE LIST (login page)
   ===================================================== */
.login-profiles {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border, #e5e0f0);
    padding-top: 1rem;
}
.login-profiles-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #8b83a8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}
.login-profile-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.35rem;
    border: 1px solid #e5e0f0;
}
.login-profile-item:hover { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.2); }
.login-profile-item > i { font-size: 20px; color: #7c3aed; }
.login-profile-item > div { flex: 1; min-width: 0; }
.lp-name { display: block; font-weight: 600; font-size: 0.85rem; color: #1a1a2e; }
.lp-email { display: block; font-size: 0.72rem; color: #8b83a8; }
.lp-remove {
    background: none;
    border: none;
    color: #8b83a8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.lp-remove:hover { color: #dc2626; background: rgba(220,38,38,0.08); }

/* =====================================================
   ALERT BANNERS
   ===================================================== */
.alert-banner {
    margin: 0 0.75rem;
}
.alert-banner .banner-item {
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.banner-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.banner-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.banner-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Plan card */
.plan-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1rem;
}
.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}
.plan-card-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.plan-card-header .plan-price { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.plan-card-header .plan-period { font-size: 0.75rem; color: var(--text-muted); }
.plan-card-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.plan-detail { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-secondary); }
.plan-detail i { color: var(--primary); font-size: 14px; }

/* Plan grid (para listar planos) */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}
.modal-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}
.modal-box h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =====================================================
   USER ACTIONS MODAL
   ===================================================== */
.user-actions-header {
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 2px solid var(--border);
}
.user-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}
.action-card:hover {
    border-color: var(--primary);
    background: rgba(124,58,237,0.04);
    transform: translateY(-1px);
}
.action-card i { font-size: 22px; }
.action-card.action-danger { color: var(--danger); border-color: rgba(220,38,38,0.2); }
.action-card.action-danger:hover { background: rgba(220,38,38,0.04); border-color: var(--danger); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        transition: left 0.3s ease;
        box-shadow: none;
        z-index: 200;
    }
    .sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,0.15); }
    .topbar-toggle { display: block; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 150;
    }
    .sidebar-overlay.open { display: block; }
}
