/*
 * Estilos globais para a plataforma FT Telecom
 * Baseado no design "em construção" fornecido, adaptado para páginas de login,
 * registro, recuperação de senha e dashboard.
 */

:root {
    --primary-color: #0066ff;
    --secondary-color: #001a4d;
    --accent-color: #00ccff;
    --neon-blue: #00ffff;
    --neon-purple: #8a2be2;
    --gradient-primary: linear-gradient(135deg, #0066ff, #00ccff);
    --gradient-bg: linear-gradient(135deg, #000428 0%, #004e92 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #b3d9ff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Fundo animado */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 204, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 204, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) { width: 80px; height: 80px; top: 20%; left: 10%; animation-delay: 0s; }
.shape:nth-child(2) { width: 120px; height: 120px; top: 60%; right: 15%; animation-delay: 2s; }
.shape:nth-child(3) { width: 60px; height: 60px; bottom: 30%; left: 20%; animation-delay: 4s; }
.shape:nth-child(4) { width: 100px; height: 100px; top: 10%; right: 30%; animation-delay: 1s; }
.shape:nth-child(5) { width: 140px; height: 140px; bottom: 10%; right: 40%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); opacity: 0.1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.2; }
}

/* Componentes Comuns */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.form-input {
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 1rem;
    width: 100%;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-link {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
}

/* Layout Dashboard */
.dashboard {
    display: flex;
    min-height: 100vh;
    color: var(--text-primary);
}

.sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.menu {
    list-style: none;
    flex: 1;
}

.menu li {
    margin-bottom: 15px;
}

.menu a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu a:hover, .menu a.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.content {
    margin-left: 260px;
    padding: 40px;
    width: calc(100% - 260px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

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

.card-stat {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    color: var(--text-primary);
    text-align: center;
}

.card-stat h3 { font-size: 2rem; margin-bottom: 10px; }
.card-stat span { font-size: 0.9rem; color: var(--text-secondary); }

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .sidebar { width: 200px; }
    .content { margin-left: 220px; width: calc(100% - 220px); }
    .cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
    .sidebar { position: static; width: 100%; height: auto; display: none; }
    .content { margin: 0; width: 100%; }
    .dashboard { flex-direction: column; }
}


/* Sidebar colapsada */
.sidebar {
  width: 260px;
  transition: width .2s ease, transform .2s ease;
}
.sidebar.closed {
  width: 64px;
  overflow: hidden;
}
body.sidebar-closed .content {
  margin-left: 64px; /* ajuste conforme seu layout */
}
.navbar .btn-icon { cursor: pointer; }

/* Tema claro/escuro básico (ajuste ao seu design) */
:root { color-scheme: light; }
.dark { color-scheme: dark; }
.dark body { background: #0b0f19; color: #e5e7eb; }
.light body { background: #f7f7fb; color: #111827; }
