/* ============================================
   VÍSION HUB WEB - Estilos gerais do site + hubs
   Nav compacta, páginas internas, hub de paineis,
   painel de hospedagem
   ============================================ */

/* ============================================
   NAV COMPACTA (8 itens)
   ============================================ */
.header-nav.compact {
    gap: 4px;
    margin: 0 auto;
}

.header-nav.compact .nav-link {
    padding: 7px 12px;
    font-size: 13.5px;
}

@media (max-width: 1200px) {
    .header-nav.compact .nav-link {
        padding: 7px 9px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .header-nav.compact {
        margin: 0;
    }
}

/* ============================================
   PAGE HERO (páginas internas)
   ============================================ */
.page-hero {
    padding: 70px 30px 40px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(0, 180, 216, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 10%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(0, 180, 216, 0.12) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.page-hero .slide-badge {
    margin-bottom: 16px;
}

.page-hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.page-hero p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.page-hero .hero-cta {
    margin-top: 28px;
}

/* ============================================
   GRID DE SERVIÇOS (home + páginas)
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-purple-light));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    background: var(--bg-card-hover);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 38px;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 20px;
}

.service-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-purple-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.service-link:hover {
    gap: 10px;
    color: var(--accent-purple);
}

/* ============================================
   CHECKLIST / DIFERENCIAIS
   ============================================ */
.benefits-list {
    list-style: none;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.benefits-list li span {
    flex-shrink: 0;
    color: var(--accent-green);
    font-weight: 700;
}

/* Conteúdo de duas colunas (páginas internas) */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.two-col.reverse .col:first-child {
    order: 2;
}

.col h2 {
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.col p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}

.col .section-badge {
    margin-bottom: 12px;
}

.col-visual {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    font-size: 80px;
}

/* ============================================
   PRICING HOSTING (hospedagens)
   ============================================ */
.hosting-features {
    font-size: 13px;
}

/* ============================================
   FOOTER 4 COLUNAS
   ============================================ */
.footer-grid.four {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

@media (max-width: 992px) {
    .footer-grid.four {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ============================================
   HUB DASHBOARD (painel geral)
   ============================================ */
#hub-main {
    padding-top: 110px;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.hub-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.hub-header {
    text-align: center;
    margin-bottom: 40px;
}

.hub-header .hub-greeting {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.hub-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.user-greeting {
    font-size: 14px;
    color: var(--text-secondary);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.hub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
    opacity: 0;
    transition: var(--transition);
}

.hub-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card .hub-icon {
    font-size: 44px;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.hub-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hub-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.hub-card .hub-cta {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-purple-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hub-card.coming-soon {
    opacity: 0.75;
    border-style: dashed;
    cursor: default;
}

.hub-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.hub-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 3px 12px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hub-tag.green {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--accent-green-light);
}

/* ============================================
   PAINEL DE HOSPEDAGEM
   ============================================ */
#hosting-main {
    padding-top: 110px;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 80% 10%, rgba(0, 212, 255, 0.07) 0%, transparent 50%),
        var(--bg-primary);
}

.hosting-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.hosting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hosting-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hosting-header .header-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    text-align: center;
}

.stat-card .stat-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Toolbar */
.hosting-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.admin-search {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.admin-search:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Tabela */
.hosting-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.hosting-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.hosting-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}

.hosting-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

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

.hosting-table tr:hover td {
    background: rgba(0, 212, 255, 0.03);
}

.client-name {
    font-weight: 700;
    color: var(--text-primary);
}

.client-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.site { background: rgba(0, 212, 255, 0.12); color: var(--accent-purple-light); }
.type-badge.vps { background: rgba(124, 58, 237, 0.15); color: #c4b5fd; }
.type-badge.app { background: rgba(16, 185, 129, 0.15); color: var(--accent-green-light); }

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    vertical-align: middle;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 34px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-light));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-text {
    font-size: 12px;
    margin-left: 8px;
    font-weight: 600;
}

.status-text.running { color: var(--accent-green-light); }
.status-text.stopped { color: var(--text-muted); }

/* Botões de tabela */
.btn-ghost {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-ghost:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.btn-danger-ghost {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-danger-ghost:hover {
    background: rgba(239, 68, 68, 0.1);
}

.table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.modal-box h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group select option {
    background: var(--bg-tertiary);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.form-msg {
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

.form-msg.success { color: var(--accent-green-light); }
.form-msg.error { color: var(--accent-red); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .two-col.reverse .col:first-child {
        order: 0;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 50px 16px 30px;
    }
}
