/**
 * RedeCore — painel de hospedagem Rede System
 * Interface admin
 */

:root {
    --rc-primary: #0b5ed7;
    --rc-primary-dark: #084298;
    --rc-sidebar: #0f172a;
    --rc-sidebar-hover: #1e293b;
    --rc-bg: #f1f5f9;
    --rc-card: #ffffff;
    --rc-text: #1e293b;
    --rc-muted: #64748b;
    --rc-border: #e2e8f0;
    --rc-success: #198754;
    --rc-warning: #fd7e14;
    --rc-radius: 12px;
    --rc-green-soft: #ecfdf5;
    --rc-green-soft-hover: #d1fae5;
    --rc-green-icon: #059669;
    --rc-green-icon-light: #34d399;
    --rc-green-head: #047857;
    --rc-green-head-bg: linear-gradient(180deg, #059669 0%, #047857 100%);
}

* { box-sizing: border-box; }

body.rc-body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--rc-bg);
    color: var(--rc-text);
    min-height: 100vh;
}

.rc-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0b5ed7 100%);
    padding: 1.5rem;
}

.rc-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.rc-brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rc-primary);
    letter-spacing: -0.02em;
}

.rc-brand-sub {
    font-size: 0.85rem;
    color: var(--rc-muted);
}

.rc-layout {
    display: flex;
    min-height: 100vh;
}

.rc-sidebar {
    width: 260px;
    background: var(--rc-sidebar);
    color: #e2e8f0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.rc-sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rc-sidebar-brand .rc-brand-title { color: #fff; font-size: 1.35rem; }
.rc-sidebar-brand .rc-brand-sub { color: #94a3b8; font-size: 0.75rem; }

.rc-nav {
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
    flex: 1;
}

.rc-nav-section {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 1rem 1.25rem 0.35rem;
    font-weight: 600;
}

.rc-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.rc-nav a:hover {
    background: var(--rc-sidebar-hover);
    color: #fff;
}

.rc-nav a.active {
    background: rgba(11, 94, 215, 0.2);
    color: #fff;
    border-left-color: var(--rc-primary);
}

.rc-nav a i { width: 1.1rem; text-align: center; opacity: 0.9; }

.rc-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: #64748b;
}

.rc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rc-topbar {
    background: #fff;
    border-bottom: 1px solid var(--rc-border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.rc-topbar h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.rc-badge-dev {
    font-size: 0.7rem;
    background: #fef3c7;
    color: #92400e;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.rc-content {
    padding: 1.5rem;
    flex: 1;
}

.rc-card {
    background: var(--rc-card);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rc-card-body { padding: 1.25rem; }

.rc-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rc-stat {
    padding: 1.25rem;
}

.rc-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rc-muted);
    font-weight: 600;
}

.rc-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.rc-btn-primary {
    background: var(--rc-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
}

.rc-btn-primary:hover { background: var(--rc-primary-dark); color: #fff; }

.rc-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--rc-muted);
}

.rc-empty i {
    font-size: 2.5rem;
    opacity: 0.35;
    margin-bottom: 1rem;
    display: block;
}

.rc-table { width: 100%; border-collapse: collapse; }
.rc-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rc-muted);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rc-border);
    background: #f8fafc;
}
.rc-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--rc-border);
    font-size: 0.9rem;
}
.rc-table tr:last-child td { border-bottom: none; }

@media (max-width: 768px) {
    .rc-layout { flex-direction: column; }
    .rc-sidebar { width: 100%; }
    .rc-nav { display: flex; flex-wrap: wrap; padding: 0.5rem; }
    .rc-nav-section { display: none; }
    .rc-nav a { padding: 0.5rem 0.75rem; border-left: none; border-radius: 8px; }
}

/* Admin sem sidebar — navegação pelos cards do painel */
.rc-admin-shell { background: var(--rc-bg); min-height: 100vh; }

.rc-admin-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rc-admin-bar {
    background: #fff;
    border-bottom: 1px solid var(--rc-border);
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.rc-admin-bar-start {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.rc-admin-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--rc-sidebar);
    text-decoration: none;
    white-space: nowrap;
}

.rc-admin-brand:hover { color: var(--rc-primary); }

.rc-admin-bar-sep {
    width: 1px;
    height: 1.25rem;
    background: var(--rc-border);
}

.rc-admin-page-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rc-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rc-admin-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.rc-admin-content {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2rem;
}

.rc-admin-shell .rc-da-dashboard {
    max-width: none;
}

@media (max-width: 768px) {
    .rc-admin-content { padding: 1rem; }
}

.rc-login-cliente .rc-brand-title { color: #0ea5e9; }

/* Portal do cliente — login split */
.rc-login-portal {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f8;
    padding: 1.5rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
}

.rc-login-portal-wrap {
    display: flex;
    width: 100%;
    max-width: 920px;
    min-height: min(560px, calc(100vh - 3rem));
    margin: auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(30, 40, 100, 0.18);
    background: #fff;
}

.rc-login-portal-aside {
    flex: 0 0 42%;
    background: linear-gradient(165deg, #2a3580 0%, #1e2870 45%, #252f6b 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.rc-login-portal-logo img {
    display: block;
    max-width: 200px;
    height: auto;
}

.rc-login-portal-aside-body {
    margin-top: auto;
    padding-top: 2rem;
}

.rc-login-portal-welcome {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.rc-login-portal-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    max-width: 280px;
}

.rc-login-portal-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #fff;
}

.rc-login-portal-form-inner {
    width: 100%;
    max-width: 340px;
}

.rc-login-portal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e2870;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.rc-login-portal-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1.75rem;
}

.rc-login-portal-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.rc-login-portal-input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    background: #f8fafc;
}

.rc-login-portal-input:focus {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.rc-login-portal-submit {
    background: linear-gradient(180deg, #2a3580 0%, #1e2870 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
}

.rc-login-portal-submit:hover {
    background: linear-gradient(180deg, #323d92 0%, #252f7a 100%);
    color: #fff;
}

.rc-login-portal-alert {
    border-radius: 8px;
    margin-bottom: 1rem;
}

.rc-login-portal-help {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.875rem;
}

.rc-login-portal-help a {
    color: #2563eb;
    text-decoration: none;
}

.rc-login-portal-help a:hover {
    text-decoration: underline;
}

.rc-login-portal-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .rc-login-portal-wrap {
        flex-direction: column;
        min-height: auto;
    }

    .rc-login-portal-aside {
        flex: none;
        padding: 1.75rem 1.5rem;
    }

    .rc-login-portal-aside-body {
        margin-top: 1.5rem;
        padding-top: 0;
    }

    .rc-login-portal-welcome {
        font-size: 1.35rem;
    }

    .rc-login-portal-main {
        padding: 1.75rem 1.5rem 2rem;
    }
}

.rc-sidebar-cliente .rc-nav a.active {
    background: rgba(14, 165, 233, 0.18);
    border-left-color: #0ea5e9;
}

.rc-plano-resumo {
    border-left: 4px solid #0ea5e9;
}

.rc-progress-thin {
    height: 6px;
    background: #e2e8f0;
}

.rc-plano-metric .progress-bar {
    transition: width 0.3s ease;
}

/* ——— Dashboard admin estilo DirectAdmin ——— */

.rc-da-dashboard {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.25rem;
    align-items: start;
}

.rc-da-section {
    background: #fff;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rc-da-section-head {
    background: var(--rc-green-head-bg);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 1rem;
}

.rc-da-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0;
}

.rc-da-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 1.1rem 0.65rem 1rem;
    min-height: 118px;
    text-decoration: none;
    color: var(--rc-text);
    border-right: 1px solid var(--rc-border);
    border-bottom: 1px solid var(--rc-border);
    transition: background 0.15s ease;
    position: relative;
}

.rc-da-grid .rc-da-tile:nth-child(n) {
    border-bottom: 1px solid var(--rc-border);
}

.rc-da-tile:hover {
    background: #f8fffb;
    color: var(--rc-green-head);
}

.rc-da-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--rc-green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
    transition: background 0.15s ease, transform 0.15s ease;
}

.rc-da-tile-icon i {
    font-size: 1.35rem;
    color: var(--rc-green-icon);
}

.rc-da-tile:hover .rc-da-tile-icon {
    background: var(--rc-green-soft-hover);
    transform: translateY(-1px);
}

.rc-da-tile-label {
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 500;
    max-width: 100px;
}

.rc-da-tile-soon {
    opacity: 0.72;
    cursor: not-allowed;
}

.rc-da-tile-soon:hover {
    background: #fff;
    color: var(--rc-text);
}

.rc-da-tile-soon:hover .rc-da-tile-icon {
    transform: none;
    background: var(--rc-green-soft);
}

.rc-da-tile-btn {
    width: 100%;
    border: none;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.rc-da-tile-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #fef3c7;
    color: #92400e;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
}

.rc-da-stats-card {
    background: #fff;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.rc-da-stats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--rc-border);
    background: #f8fafc;
}

.rc-da-stats-head h2 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
}

.rc-da-stats-link {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rc-green-head);
    text-decoration: none;
    white-space: nowrap;
}

.rc-da-stats-link:hover {
    color: var(--rc-green-icon);
}

.rc-da-stats-block {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--rc-border);
}

.rc-da-stats-block:last-child {
    border-bottom: none;
}

.rc-da-stats-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rc-muted);
    margin-bottom: 0.65rem;
}

.rc-da-meter-label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.rc-da-meter-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.rc-da-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rc-green-icon-light), var(--rc-green-icon));
    border-radius: 999px;
}

.rc-da-meter-hint {
    margin-top: 0.35rem;
    font-size: 0.72rem;
}

.rc-da-usage-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rc-da-usage-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #eef2f7;
}

.rc-da-usage-list li:last-child {
    border-bottom: none;
}

.rc-da-usage-list li span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rc-da-info-list {
    margin: 0;
    font-size: 0.8rem;
}

.rc-da-info-list dt {
    color: var(--rc-muted);
    font-weight: 600;
    font-size: 0.72rem;
    margin-top: 0.5rem;
}

.rc-da-info-list dt:first-child {
    margin-top: 0;
}

.rc-da-info-list dd {
    margin: 0.1rem 0 0;
}

@media (max-width: 992px) {
    .rc-da-dashboard {
        grid-template-columns: 1fr;
    }

    .rc-da-stats-card {
        position: static;
    }
}

@media (max-width: 576px) {
    .rc-da-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rc-da-tile {
        border-right: none;
    }
}

.rc-da-php-panel {
    padding: 1rem 1.1rem 1.1rem;
}

.rc-php-pill-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--rc-green-icon);
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.rc-php-pill-tag-xampp {
    background: #0ea5e9;
}

.rc-php-pill-tag-legacy {
    background: #94a3b8;
}

.rc-modal-php {
    border: none;
    border-radius: 14px;
    overflow: hidden;
}

.rc-modal-php-head {
    background: var(--rc-green-head-bg);
    color: #fff;
    border: none;
    padding: 1.1rem 1.25rem;
}

.rc-php-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.rc-php-modal-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem;
    border: 1px solid var(--rc-border);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.rc-php-modal-card-default {
    border-color: #86efac;
    background: #f8fffb;
    box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.08);
}

.rc-php-modal-card-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--rc-green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-php-modal-card-icon i {
    font-size: 1.5rem;
    color: var(--rc-green-icon);
}

.rc-php-modal-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rc-green-head);
    margin-bottom: 0.25rem;
}

.rc-php-modal-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
    color: var(--rc-muted);
    margin-bottom: 0.45rem;
}

.rc-php-modal-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.rc-da-meter-fill-alt {
    background: linear-gradient(90deg, #93c5fd, #3b82f6);
}

.rc-php-modal-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
