:root {
    --bg-dark: #020617;
    --space-dark: #050810;
    --neon-cyan: #00f2fe;
    --neon-blue: #0ea5e9;
    --neon-glow: rgba(0, 242, 254, 0.4);
    --glass-bg: rgba(15, 23, 42, 0.1);
    --glass-border: rgba(255, 255, 255, 0.12);
    --accent-emerald: #00f2fe;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --nav-bg: rgba(7, 12, 24, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: transparent; /* Permite ver el fondo de la nebulosa sin obstrucción */
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Enhanced Background Nebula Effect */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background-color: #010409;
    background-image: url('rice_field_bg.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Starfield and Blobs removed in favor of custom image */

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Blobs removed for custom background image */

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, 50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(10px, -30px) scale(1);
    }
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.main-header {
    padding: 1.25rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(2, 6, 23, 0.4);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-accent {
    background: linear-gradient(to right, var(--accent-emerald), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicators {
    display: flex;
    gap: 0.4rem;
}

.indicator {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Consistent View Headers */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.step-indicator {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    height: auto;
}

.content-view {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    padding-bottom: 6rem;
    scrollbar-width: none;
}

.content-view::-webkit-scrollbar {
    display: none;
}

/* Neon Glass Cards */
.card {
    background: rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2.25rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Asymmetrical directional glow - top-left dominance */
    box-shadow: 
        -5px -5px 25px rgba(0, 242, 254, 0.15),
        0 0 15px rgba(0, 242, 254, 0.05),
        inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2.25rem;
    padding: 1.5px; /* Thicker for better glow visibility */
    /* Multi-stop gradient for "parts" glimmers */
    background: conic-gradient(
        from var(--shimmer-angle, 0deg),
        transparent 0%,
        rgba(0, 242, 254, 0.1) 10%,
        rgba(0, 242, 254, 0.8) 20%, /* "Destello" hot spot */
        rgba(0, 242, 254, 0.1) 30%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.6) 75%, /* Secondary white glimmer */
        transparent 90%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    
    animation: neonShimmer 8s linear infinite;
    pointer-events: none;
    opacity: 0.8;
}

@property --shimmer-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes neonShimmer {
    0% { --shimmer-angle: 0deg; }
    100% { --shimmer-angle: 360deg; }
}

@keyframes borderGlimmer {
    0% { background-position: -100% -100%; }
    100% { background-position: 200% 200%; }
}

.card:active {
    transform: scale(0.98);
}

.bottom-nav {
    position: fixed;
    bottom: 0px;
    left: 1rem;
    right: 1rem;
    margin-bottom: 1.25rem;
    height: 4.75rem;
    background: rgba(15, 23, 42, 0.15) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 2.5rem;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.1);
}

nav.bottom-nav .nav-item {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    color: var(--text-secondary) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    padding: 0.5rem 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    border-radius: 1.5rem !important;
    min-width: 60px !important;
}

.nav-item .nav-icon {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.nav-item .nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

nav.bottom-nav .nav-item.active {
    color: var(--neon-cyan) !important;
    background: transparent !important;
    background-color: transparent !important;
}

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.4));
}

.nav-item.active .nav-label {
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.nav-item:active {
    transform: scale(0.92);
}

/* Neon Pill Buttons (Stadium) */
.btn {
    padding: 1rem 2rem;
    border-radius: 99px; /* Pill shape */
    border: none;
    font-weight: 800;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(90deg, #00f2fe, #0ea5e9);
    color: #020617;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: scale(0.94);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.08);
}

/* Status Indicators (Mockup Style) */
.status-indicators {
    display: flex;
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    padding: 0.25rem 0.5rem;
}

.indicator {
    font-size: 0.7rem;
    padding: 0.2rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.indicator:first-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: var(--glass-border);
}

.indicator.success {
    color: var(--accent-emerald);
    border-color: rgba(0, 242, 254, 0.3);
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

.indicator.error {
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Premium Level Selector (Mockup style) */
.level-selector-premium {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.level-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 0.85rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.level-card:active {
    transform: scale(0.93);
}

.level-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.3rem;
    line-height: 1;
}

.level-card.nulo .level-icon-wrap {
    background: rgba(148, 163, 184, 0.12);
}
.level-card.bajo .level-icon-wrap {
    background: rgba(16, 185, 129, 0.12);
}
.level-card.medio .level-icon-wrap {
    background: rgba(245, 158, 11, 0.12);
}
.level-card.alto .level-icon-wrap {
    background: rgba(239, 68, 68, 0.12);
}

.level-card span {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-card small {
    font-size: 0.58rem;
    opacity: 0.5;
}

/* Active States for Level Cards (Solid/Lit up) */
.level-card.active.nulo {
    background: linear-gradient(145deg, #4b5563, #374151) !important;
    border-color: #94a3b8;
    color: #e2e8f0 !important;
    box-shadow: 0 0 20px rgba(148, 163, 184, 0.35);
}
.level-card.active.nulo .level-icon-wrap {
    background: rgba(255,255,255,0.15);
}

.level-card.active.bajo {
    background: linear-gradient(145deg, #059669, #047857) !important;
    border-color: #10b981;
    color: #fff !important;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.55);
}
.level-card.active.bajo .level-icon-wrap {
    background: rgba(255,255,255,0.18);
}

.level-card.active.medio {
    background: linear-gradient(145deg, #d97706, #b45309) !important;
    border-color: #f59e0b;
    color: #fff !important;
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.55);
}
.level-card.active.medio .level-icon-wrap {
    background: rgba(255,255,255,0.18);
}

.level-card.active.alto {
    background: linear-gradient(145deg, #dc2626, #b91c1c) !important;
    border-color: #ef4444;
    color: #fff !important;
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.55);
}
.level-card.active.alto .level-icon-wrap {
    background: rgba(255,255,255,0.18);
}

/* Inverted Levels for Beneficials */
.inverted-levels .level-card.bajo .level-icon-wrap {
    background: rgba(239, 68, 68, 0.12);
}
.inverted-levels .level-card.alto .level-icon-wrap {
    background: rgba(16, 185, 129, 0.12);
}
.inverted-levels .level-card.active.bajo {
    background: linear-gradient(145deg, #dc2626, #b91c1c) !important;
    border-color: #ef4444;
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.55);
}
.inverted-levels .level-card.active.alto {
    background: linear-gradient(145deg, #059669, #047857) !important;
    border-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}

/* Disease 0-9 Grid */
.grid-0-9 {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 0;
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.level-btn {
    aspect-ratio: 1;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.level-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

.level-btn-zero {
    grid-row: span 3;
    aspect-ratio: auto !important;
    font-size: 1.8rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
}

.level-btn.active {
    color: white;
}

.level-btn.btn-green.active {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.level-btn.btn-yellow.active {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.level-btn.btn-red.active {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.level-btn.level-btn-zero.active {
    background: #64748b;
    border-color: #94a3b8;
}

/* Modal and Threshold Tables */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.threshold-modal {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.threshold-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1rem;
}

.threshold-table th {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem;
}

.threshold-table td {
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.threshold-table td:first-child { border-radius: 12px 0 0 12px; text-align: left; padding-left: 1rem; }
.threshold-table td:last-child { border-radius: 0 12px 12px 0; }

.lvl-1 { color: #10b981; }
.lvl-2 { color: #f59e0b; }
.lvl-3 { color: #ef4444; }

.inverted-thresholds .lvl-1 { color: #ef4444; }
.inverted-thresholds .lvl-3 { color: #10b981; }

/* Weed Grid Table */
.weed-threshold-grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.65rem;
    color: var(--text-primary);
}

.weed-threshold-grid th, .weed-threshold-grid td {
    border: 1px solid var(--glass-border);
    padding: 6px 4px;
    text-align: center;
}

.weed-grid-header { background: rgba(0, 242, 254, 0.1); font-weight: 800; color: var(--neon-cyan); }
.weed-size-col { font-weight: 700; background: rgba(255, 255, 255, 0.05); text-align: left !important; padding-left: 8px !important; }

.cell-green { background: rgba(16, 185, 129, 0.25) !important; color: #10b981; font-weight: 800; }
.cell-yellow { background: rgba(245, 158, 11, 0.25) !important; color: #f59e0b; font-weight: 800; }
.cell-red { background: rgba(239, 68, 68, 0.25) !important; color: #ef4444; font-weight: 800; }

/* Monitoring Layout Helpers */
.monitoring-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    margin-bottom: 5rem;
    scrollbar-width: none;
}

.monitoring-scroll::-webkit-scrollbar {
    display: none;
}

.sticky-footer {
    position: fixed;
    bottom: 5.5rem;
    left: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.2));
}

.level-card.active small {
    opacity: 0.85;
}

/* Pest icon chip */
.pest-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Disease icon chip */
.disease-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    border: 1px solid rgba(139,92,246,0.2);
}

/* Weed icon chip */
.weed-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.15));
    border: 1px solid rgba(16,185,129,0.2);
}

/* Monitor step enhanced */
.step-item.active {
    background: linear-gradient(135deg, #00c6fb, #005bea) !important;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 91, 234, 0.4);
    transform: translateY(-2px);
}

/* Icon Grid for selection */
.monitor-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 0.6rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.05);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.2rem;
    border-radius: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.step-emoji {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.3s;
}

.step-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.step-item.active {
    background: linear-gradient(135deg, #00f2fe, #0ea5e9);
    color: #020617;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
    transform: translateY(-2px);
}

.step-item.active .step-emoji {
    transform: scale(1.15);
}

/* Dashboard Specifics */
.dashboard-title-card {
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(0, 242, 254, 0.2);
    text-align: left;
}

.main-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-greeting h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.action-card {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
    margin-bottom: 1.5rem;
}

.action-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-header:active {
    transform: scale(0.97);
}

.rocket-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.3));
}

.action-label {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.pending-glow-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1.5rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.pending-glow-card.has-pending {
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.25);
    border-color: rgba(0, 198, 251, 0.6);
}

.pending-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.pending-info {
    display: flex;
    flex-direction: column;
}

.pending-count {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.pending-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.config-link-wrap {
    text-align: center;
    margin-bottom: 1.5rem;
}

.config-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.config-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Admin Specifics */
.admin-menu-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem;
    border-radius: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-menu-card:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.08);
}

.admin-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.admin-text h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    letter-spacing: -0.3px;
}

.admin-text p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.admin-chevron {
    margin-left: auto;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    opacity: 0.4;
}

.admin-menu-card.danger {
    border-color: rgba(239, 68, 68, 0.2);
}

.admin-menu-card.danger .admin-icon-wrap {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.user-profile-card {
    margin-top: 2rem;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.05);
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #020617;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.user-details h4 {
    font-size: 1.1rem;
    font-weight: 800;
}

.user-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sync-now-btn {
    width: 100%;
}

/* Records View Specifics */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-title {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    font-weight: 800;
}

.header-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.record-card {
    border-left: 4px solid var(--accent-blue);
    padding: 1.5rem;
}

.record-card.pending {
    border-left-color: var(--accent-yellow);
}

.record-card.synced {
    border-left-color: var(--accent-green);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.record-info {
    display: flex;
    gap: 1rem;
}

.record-icon-wrap {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    border: 1px solid var(--glass-border);
}

.record-text {
    display: flex;
    flex-direction: column;
}

.record-title {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.record-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.record-status-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.record-status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.record-status-badge.synced {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.record-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.grid-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.record-coords {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.record-details {
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.record-detail-section {
    margin-bottom: 1rem;
}

.record-detail-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.record-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.record-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-small {
    flex: 1;
    padding: 0.7rem;
    font-size: 0.7rem;
}

.delete-btn {
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: var(--accent-red) !important;
}

.pending-summary-card {
    border: 1px solid var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), transparent);
    text-align: center;
    padding: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.1);
}

.pending-summary-card p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.neon-text {
    color: var(--neon-cyan);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    width: 64px;
    height: 64px;
    opacity: 0.15;
    margin-bottom: 1.5rem;
}

.add-item-card {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.08), transparent);
    border-color: rgba(0, 242, 254, 0.2);
    margin-bottom: 2rem;
}

.card-subtitle {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.list-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.list-item-nested-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.item-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.item-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
}

.detail-row {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.detail-row strong {
    color: var(--text-primary);
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-only.delete {
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-icon-only:active {
    transform: scale(0.9);
}

.empty-list-msg {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.6;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Registration View Specifics */
.registration-card {
    margin-top: 3rem;
    padding: 2.5rem;
    text-align: center;
}

.registration-header {
    margin-bottom: 2.5rem;
}

.registration-icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #020617;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
}

.view-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.field-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.field-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-modern {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.input-modern:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.input-with-icon .input-modern {
    padding-left: 3.5rem;
}

.registration-btn {
    width: 100%;
    margin-top: 2rem;
    font-size: 1rem;
    height: 3.5rem;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card {
    animation: slideUp 0.5s ease-out backwards;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Dashboard & Neon Refinements */
.dashboard-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideUpHero 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUpHero {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.welcome-card {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 242, 254, 0.3);
    padding: 2.25rem 1.75rem;
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.15);
}

.hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.85rem;
    letter-spacing: -0.5px;
}

.hero-greeting {
    font-size: 1.15rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

.emoji-rice {
    font-size: 1.5rem;
}

.action-container {
    padding: 0;
    overflow: hidden;
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.2);
}

.action-main {
    margin: 1.25rem 1.25rem 0.75rem;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    background: rgba(245, 158, 11, 0.15);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 2rem;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.action-main:active {
    background: rgba(245, 158, 11, 0.25);
    transform: scale(0.98);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.action-icon-rocket {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

.action-label {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffd8a8;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.status-pill {
    background: linear-gradient(180deg, rgba(0, 242, 254, 0.25), rgba(14, 165, 233, 0.45));
    margin: 0 1.25rem 1.25rem;
    padding: 1.25rem 1.75rem;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 25px rgba(14, 165, 233, 0.5),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.status-icon {
    width: 42px;
    height: 42px;
    background: rgba(0, 242, 254, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 1.2rem;
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-info strong {
    font-size: 1rem;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
    letter-spacing: 0.2px;
}

.status-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.config-link-row {
    text-align: center;
    margin: -0.5rem 0 1rem;
}

.config-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: underline;
    opacity: 0.7;
    transition: all 0.3s;
    font-weight: 500;
}

.config-link:active {
    opacity: 1;
    color: var(--neon-cyan);
}

.btn-sync-neon {
    width: 100%;
    height: 4.5rem;
    font-size: 1.15rem;
    font-weight: 900;
    background: linear-gradient(90deg, #00f2fe, #0ea5e9);
    color: #020617;
    border-radius: 2rem;
    box-shadow: 
        0 0 30px rgba(0, 242, 254, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.3);
    border: none;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-sync-neon:active {
    transform: scale(0.95);
    filter: brightness(1.2);
}

.sync-section {
    padding: 0.5rem 0;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.3));
}

.install-card {
    text-align: center;
    background: rgba(0, 242, 254, 0.04);
    border-style: dashed;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Fix for top logo drop shadow */
.main-header .logo img {
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.2));
}

/* Orbital Background Details */
.orbital-lines {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 242, 254, 0.05);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.orbital-lines::after {
    content: '';
    position: absolute;
    top: 10%; left: 10%; right: 10%; bottom: 10%;
    border: 1px solid rgba(14, 165, 233, 0.03);
    border-radius: 50%;
}

/* Threshold Indicators */
.threshold-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.threshold-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.threshold-dot.green.active {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.threshold-dot.yellow.active {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.threshold-dot.red.active {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Specific helpers for beneficials inversion */
.inverted-levels .level-card.bajo .level-icon-wrap {
    background: rgba(239, 68, 68, 0.15);
}
.inverted-levels .level-card.alto .level-icon-wrap {
    background: rgba(16, 185, 129, 0.15);
}
.inverted-levels .level-card.active.bajo {
    background: linear-gradient(145deg, #dc2626, #b91c1c) !important;
    border-color: #ef4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}
.inverted-levels .level-card.active.alto {
    background: linear-gradient(145deg, #059669, #047857) !important;
    border-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}