/* ==================================================
   Placismo.NetCloud - Sistema de Diseño Web
   Versión: 1.0 | Fecha: 15 de enero de 2026
   ================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==================================================
   VARIABLES CSS - PALETA DE COLORES OFICIAL
   ================================================== */

:root {
    /* Colores de Marca */
    --brand-primary: #1F6AE1;       /* Azul Cloud */
    --brand-secondary: #0B3C8A;     /* Azul Profundo */
    --brand-accent: #E53935;        /* Rojo Net */

    /* Estados */
    --success: #2ECC71;
    --warning: #FBC02D;
    --error: #E53935;
    --info: #4FA3FF;

    /* Fondos - Tema Claro */
    --bg-main: #F5F8FC;
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-hover: #EDF2FA;
    --bg-active: #E3EBFA;

    /* Textos - Tema Claro */
    --text-main: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #94A3B8;
    --text-disabled: #CBD5E1;

    /* Bordes */
    --border-color: #CBD5E1;
    --border-color-hover: #94A3B8;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Tema Oscuro */
[data-theme="dark"] {
    --brand-primary: #4FA3FF;
    --brand-secondary: #1F6AE1;
    --brand-accent: #F87171;

    --success: #4ADE80;
    --warning: #FACC15;
    --error: #F87171;
    --info: #60A5FA;

    --bg-main: #0B1220;
    --bg-card: #111B2E;
    --bg-elevated: #1A2332;
    --bg-hover: #1E2A3D;
    --bg-active: #253145;

    --text-main: #E5EDFF;
    --text-secondary: #A5B4D4;
    --text-tertiary: #7080A0;
    --text-disabled: #4A5568;

    --border-color: #2D3748;
    --border-color-hover: #4A5568;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* ==================================================
   BASE STYLES
   ================================================== */

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100vh;
    width: 100%;
}

.loading-progress {
    position: absolute;
    top: calc(50% - 2.5rem);
    left: calc(50% - 2.5rem);
    width: 5rem;
    height: 5rem;
}

.loading-progress circle {
    fill: none;
    stroke-width: 0.35rem;
    stroke-linecap: round;
    transform-origin: center;
}

.loading-progress circle:first-child {
    stroke: rgba(31, 106, 225, 0.15);
}

.loading-progress circle:last-child {
    stroke: var(--brand-primary);
    stroke-dasharray: 180;
    animation: loading-progress-spin 1.2s ease-in-out infinite;
}

.loading-progress-text {
    position: absolute;
    top: calc(50% + 3rem);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes loading-progress-spin {
    0% {
        stroke-dashoffset: 180;
        transform: rotate(0deg);
    }

    50% {
        stroke-dashoffset: 45;
        transform: rotate(180deg);
    }

    100% {
        stroke-dashoffset: 180;
        transform: rotate(360deg);
    }
}

/* ==================================================
   LAYOUT
   ================================================== */

.page-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

/* ==================================================
   LOGO
   ================================================== */

.app-logo {
    height: 40px;
    width: auto;
}

[data-theme="light"] .app-logo-dark,
:root:not([data-theme="dark"]) .app-logo-dark {
    display: none;
}

[data-theme="dark"] .app-logo-light {
    display: none;
}

/* ==================================================
   STATUS CHIPS
   ================================================== */

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-chip.pendiente {
    background-color: rgba(251, 192, 45, 0.1);
    color: #FBC02D;
}

.status-chip.en-progreso {
    background-color: rgba(79, 163, 255, 0.1);
    color: #4FA3FF;
}

.status-chip.completada {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ECC71;
}

[data-theme="dark"] .status-chip.pendiente {
    color: #FACC15;
}

[data-theme="dark"] .status-chip.en-progreso {
    color: #60A5FA;
}

[data-theme="dark"] .status-chip.completada {
    color: #4ADE80;
}

/* ==================================================
   SCROLLBAR
   ================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-hover);
}

/* ==================================================
   ACCESSIBILITY
   ================================================== */

*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ==================================================
   GLASSMORPHISM EFFECTS
   ================================================== */

.glass-card {
    background: rgba(17, 27, 46, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4) !important;
}

.mud-theme-light .glass-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(31, 106, 225, 0.2) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 106, 225, 0.15) !important;
}

.glass-input {
    transition: all 0.3s ease;
}

.glass-input .mud-input-root {
    background: rgba(255, 255, 255, 0.08) !important;
}

.glass-input .mud-input-outlined .mud-input-slot {
    color: rgba(255, 255, 255, 0.95) !important;
}

.glass-input .mud-input-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

.glass-input .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.glass-input .mud-input-root,
.glass-input .mud-input-slot,
.glass-input .mud-input-adornment {
    background-color: transparent !important;
}

.glass-input:hover .mud-input-root {
    background: rgba(255, 255, 255, 0.12) !important;
}

.glass-input .mud-input-adornment {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Light theme glass inputs */
.mud-theme-light .glass-input .mud-input-root {
    background: rgba(31, 106, 225, 0.10) !important;
}

.mud-theme-light .glass-input .mud-input-outlined .mud-input-slot {
    color: #0F172A !important;
}

.mud-theme-light .glass-input .mud-input-label {
    color: #475569 !important;
}

.mud-theme-light .glass-input .mud-input-outlined-border {
    border-color: rgba(31, 106, 225, 0.4) !important;
}

.mud-theme-light .glass-input .mud-input-adornment {
    color: var(--text-secondary) !important;
}

.mud-theme-light .glass-input .mud-input-outlined .mud-input-slot {
    color: var(--text-main) !important;
}

.mud-theme-light .glass-input .mud-icon-root {
    color: var(--text-secondary) !important;
}

/* Light theme hover state */
.mud-theme-light .glass-input:hover .mud-input-root {
    background: rgba(31, 106, 225, 0.15) !important;
}

.btn-glow {
    box-shadow: 0 4px 14px 0 rgba(31, 106, 225, 0.39);
    transition: all 0.2s ease;
}

.btn-glow:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(31, 106, 225, 0.5);
}

.btn-glow:active {
    transform: translateY(0);
}

/* ==================================================
   AUTH LAYOUT BACKGROUNDS
   ================================================== */

.auth-layout-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0B1220 0%, #1A2332 50%, #0B3C8A 100%);
    z-index: 0;
    overflow: hidden;
}

/* Three.js canvas styling */
.auth-background canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(11, 60, 138, 0.4) 0%,
        rgba(11, 18, 32, 0.8) 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1;
}

.auth-layout-content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo corporativo con variantes de tema */
.logo-corporate {
    width: 200px;
    height: auto;
    margin-bottom: 2rem;
    display: block;
}

.logo-dark-theme {
    display: block;
}

.logo-light-theme {
    display: none;
}

[data-theme="light"] .logo-dark-theme {
    display: none;
}

[data-theme="light"] .logo-light-theme {
    display: block;
}

/* ==================================================
   CARD GRID & HOVER EFFECTS
   ================================================== */

.user-card,
.tarea-card-grid,
.cliente-card-grid {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: 12px;
    cursor: pointer;
}

.user-card:hover,
.tarea-card-grid:hover,
.cliente-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2) !important;
}

.user-avatar-initials {
    font-weight: 600;
    font-size: 1.1rem;
}

/* ==================================================
   RESPONSIVE ADJUSTMENTS
   ================================================== */

@media (max-width: 599px) {
    .auth-layout-content {
        padding: 1rem;
    }

    .glass-card {
        margin: 0;
        max-width: 100%;
        padding: 1.5rem !important;
    }

    .logo-corporate {
        width: 160px;
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .logo-corporate {
        width: 180px;
    }
}

@media (min-width: 960px) {
    .logo-corporate {
        width: 220px;
    }
}

/* Fallback para navegadores sin backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .glass-card {
        background: rgba(17, 27, 46, 0.95);
    }

    .glass-input {
        background: rgba(17, 27, 46, 0.8) !important;
    }
}

/* ===========================
   Accessibility: Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Hide Three.js animated background */
    .auth-background canvas {
        display: none;
    }
    
    /* Disable loading spinner animation */
    .loading-progress circle:last-child {
        animation: none;
    }
}
