/* portal_style.css - Tema azul com degradê */
:root {
    --primary-color: #0078d4;
    --primary-bright: #1a8cff;
    --blue-deep: #003366;
    --blue-dark: #004a8f;
    --blue-mid: #0066b8;
    --dark-bg-primary: #003366;
    --dark-bg-secondary: #004a8f;
    --sidebar-bg: #002952;
    --border-color: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.78);
    --status-active-bg: #00a86b;
    --gradient-body: linear-gradient(155deg, #003366 0%, #004a8f 30%, #0078d4 65%, #1a8cff 100%);
    --gradient-panel: linear-gradient(145deg, #004a8f 0%, #0078d4 60%, #1a8cff 100%);
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-text: #003366;
}

/* --- ESTILOS GERAIS --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--blue-deep);
    background-image: var(--gradient-body);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
}

/* --- ESTILOS DA PÁGINA DE LOGIN (SPLIT-SCREEN) --- */
.login-page-body {
    padding: 0;
}
.login-split-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
}
.login-left-panel {
    width: 50%;
    background-image: url('assets/img/bg-azul.png'), var(--gradient-panel);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.welcome-overlay {
    background: linear-gradient(145deg, rgba(0, 51, 102, 0.75) 0%, rgba(0, 120, 212, 0.65) 100%);
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    max-width: 80%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}
.welcome-overlay h2 { font-size: 32px; margin-bottom: 10px; color: #fff; }
.welcome-overlay p { color: rgba(255, 255, 255, 0.9); }
.login-right-panel {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #004a8f 0%, #0078d4 100%);
}
.login-form-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}
.login-right-panel .portal-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.login-right-panel .portal-header h1 {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
}
.login-right-panel .form-group { margin-bottom: 20px; }
.login-right-panel .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #fff;
}
.login-right-panel .form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--input-text);
    box-sizing: border-box;
    font-size: 16px;
}
.login-right-panel .form-group input::placeholder { color: #5a7a9a; }
.login-right-panel .btn-portal {
    width: 100%;
    background: linear-gradient(135deg, #002952 0%, #1a8cff 100%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    border-radius: 6px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.login-right-panel .btn-portal:hover {
    background: linear-gradient(135deg, #003366 0%, #0078d4 100%);
    transform: translateY(-1px);
}
.btn-portal .button-loader { animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.login-right-panel .message.error {
    background-color: rgba(180, 40, 50, 0.25);
    color: #ffe0e0;
    border: 1px solid #ff8a8a;
    padding: 10px;
    margin-top: 20px;
    border-radius: 6px;
    text-align: center;
}
.login-right-panel .sub-link { text-align: center; margin-top: 25px; }
.login-right-panel .sub-link a { color: #ffffff; text-decoration: none; font-weight: 500; text-shadow: 0 1px 4px rgba(0, 30, 70, 0.35); }
.login-right-panel .sub-link a:hover { text-decoration: underline; }

/* --- ESTILOS DO PORTAL DASHBOARD --- */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #002952 0%, #003d7a 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header { padding: 25px 20px; border-bottom: 1px solid var(--border-color); }
.sidebar-header h2 { margin: 0; color: #ffffff; font-size: 20px; }
.sidebar-nav { flex-grow: 1; padding-top: 15px; }
.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 0 10px 5px 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}
.nav-link i { margin-right: 15px; width: 20px; font-size: 14px; }
.nav-link:hover { background-color: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-link.active {
    background: linear-gradient(135deg, #0078d4 0%, #1a8cff 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 40, 90, 0.3);
}
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }
.logout-button {
    display: block;
    text-align: center;
    background-color: #c93c3c;
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}
.main-content {
    flex-grow: 1;
    padding: 30px 40px;
    background: linear-gradient(160deg, #004a8f 0%, #0066b8 45%, #0078d4 100%);
    overflow-y: auto;
    color: #fff;
}
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.header-greeting h1 { margin: 0; font-size: 28px; color: #fff; }
.header-greeting p { margin: 5px 0 0; color: var(--text-secondary); }
.header-status { display: flex; align-items: center; gap: 10px; }
.status-badge { padding: 5px 12px; border-radius: 20px; font-weight: bold; font-size: 12px; }
.status-active { background-color: var(--status-active-bg); color: white; }
.status-expired { background-color: #dc3545; color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.content-card {
    background: linear-gradient(145deg, rgba(0, 41, 82, 0.55) 0%, rgba(0, 100, 180, 0.45) 100%);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #fff;
}
.content-card h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.input-group { display: flex; }
.input-group input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px 0 0 6px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border-right: none;
}
.input-group button {
    background: linear-gradient(135deg, #0055a5 0%, #1a8cff 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0 15px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

/* Layout de lista para os planos */
.plan-list-item {
    background: linear-gradient(145deg, rgba(0, 41, 82, 0.55) 0%, rgba(0, 100, 180, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.plan-info { flex-grow: 1; }
.plan-info .plan-name { font-size: 18px; font-weight: bold; color: #fff; }
.plan-info .plan-price { font-size: 28px; font-weight: bold; color: #ffffff; margin: 5px 0; text-shadow: 0 1px 6px rgba(0, 30, 70, 0.35); }
.plan-info .plan-price span { font-size: 16px; font-weight: normal; color: var(--text-secondary); }
.plan-info .plan-duration { font-size: 14px; color: var(--text-secondary); }
.btn-buy-plan {
    background: linear-gradient(135deg, #002952 0%, #1a8cff 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    white-space: nowrap;
}

.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.app-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    background: linear-gradient(145deg, #003d7a 0%, #0078d4 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
.app-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 30, 70, 0.35);
}
.app-button i { font-size: 36px; margin-bottom: 10px; }
.btn-portal.support {
    display: block;
    text-align: center;
    background-color: #25D366;
    color: #fff;
    padding: 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 40, 90, 0.75);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
    background: linear-gradient(160deg, #004a8f 0%, #0078d4 100%);
    color: var(--text-primary);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 450px;
    animation: fadeIn 0.3s;
}
.close-button {
    color: rgba(255, 255, 255, 0.75);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover { color: #fff; }
.modal-content .pix-qrcode { text-align: center; margin: 20px 0; }
.modal-content .pix-qrcode img { max-width: 250px; width: 100%; border: 5px solid white; border-radius: 8px; }

/* Toast */
.toast {
    visibility: hidden;
    min-width: 150px;
    background-color: #00a86b;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
}
.toast.show { visibility: visible; animation: fadein-toast 0.5s, fadeout-toast 0.5s 1.5s; }
@keyframes fadein-toast { from { bottom: 0; opacity: 0; } to { bottom: 30px; opacity: 1; } }
@keyframes fadeout-toast { from { bottom: 30px; opacity: 1; } to { bottom: 0; opacity: 0; } }

/* Responsividade */
@media (max-width: 992px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
    .main-header { flex-direction: column; align-items: flex-start; gap: 15px; }
}
@media (max-width: 768px) {
    .login-left-panel { display: none; }
    .login-right-panel { width: 100%; }
}
@media (max-width: 480px) {
    .plan-list-item { flex-direction: column; align-items: stretch; text-align: center; }
    .btn-buy-plan { margin-top: 15px; }
}
