﻿/* wwwroot/css/site.css */


/* --- GENERAL LAYOUT & BASE STYLES --- */


html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8fafc; /* Color de fondo por defecto */
    transition: background 0.2s;

    height: 100%;
    margin: 0;
    overflow: hidden; /* evita scroll duplicado */
}



main {
    flex-grow: 1;
}

/* Sidebar Scrollbar Hiding */
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Logo Shadow Effect */
.logo-shadow {
    box-shadow: 0 8px 20px 0 rgba(38, 122, 246, 0.187); /* #267af630 */
}

/* --- HEADER STYLES --- */
.header {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
}

    .header .navbar-brand img {
        max-height: 50px;
    }

/* --- HERO SECTION STYLES (Landing Page) --- */
.hero-section {
    background: url('../images/hero-background.jpg') no-repeat center center;
    background-size: cover;
    color: #fff;
    padding: 6rem 1rem;
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .hero-section.fallback-bg {
        background-color: #6f42c1;
        color: #fff;
    }

    .hero-section h1 {
        font-size: 2.8rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    }

    .hero-section .lead {
        font-size: 1.3rem;
        font-weight: 300;
        margin-bottom: 2rem;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    }

/* --- TENANTS SECTION STYLES (Landing Page) --- */
.tenants-section {
    padding: 4rem 1rem;
    background-color: #f8f9fa;
}

    .tenants-section h2 {
        text-align: center;
        margin-bottom: 3rem;
        font-weight: 600;
        color: #343a40;
    }

.tenant-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .tenant-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    .tenant-card img {
        max-height: 60px;
        margin-bottom: 1rem;
        object-fit: contain;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .tenant-card h5 {
        font-size: 1.2rem;
        font-weight: 500;
        margin-bottom: 1rem;
        color: #333;
        flex-grow: 1;
    }

    .tenant-card .btn-tenant-login {
        background-color: #6c757d;
        border-color: #6c757d;
        color: white;
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

        .tenant-card .btn-tenant-login:hover {
            background-color: #5a6268;
            border-color: #545b62;
        }

/* --- FOOTER STYLES --- */
.footer {
    background-color: #343a40;
    color: #fff;
    padding: 3rem 0;
    font-size: 0.9rem;
    margin-top: auto;
}

    .footer h5 {
        color: #fff;
        margin-bottom: 1rem;
    }

    .footer p, .footer ul {
        color: #adb5bd;
    }

    .footer a {
        color: #adb5bd;
        text-decoration: none;
    }

        .footer a:hover {
            color: #fff;
            text-decoration: underline;
        }

    .footer .social-icons a {
        color: #fff;
        margin-right: 15px;
        font-size: 1.6rem;
        transition: color 0.2s;
    }

        .footer .social-icons a:hover {
            color: #0d6efd;
        }

/* --- DEVSISXPRESS & GENERAL DARK MODE STYLES --- */

/* LIGHT Mode DevExtreme TreeView Selection */
.dx-treeview-item.dx-state-selected,
.dx-treeview-node .dx-treeview-item.dx-state-selected {
    background: #267AF6 !important;
    color: #fff !important;
}

.dx-treeview-item .dx-icon, .dx-treeview-item .dx-icon::before {
    color: #267AF6 !important;
}

.dx-treeview-item.dx-state-hover:not(.dx-state-selected) {
    background: #e5f0fd !important;
    color: #267AF6 !important;
}

/* DARK Mode Global Overrides */
.dark body {
    background-color: #121926;
}

.dark main {
    background: #121926; /* Ensure main content also matches dark background */
    color: #e5e7eb; /* General text color for main content in dark mode */
}

.dark .sidebar,
.dark .dx-overlay-content { /* For DevExtreme popups and overlays */
    background: #171e2b !important;
}

.dark header,
.dark .sidebar {
    background: #171e2b !important;
    border-color: #273043 !important;
}

.dark .border-blue-100 { /* For borders that should adapt to dark mode */
    border-color: #273043 !important;
}

.dark .logo-shadow {
    box-shadow: 0 8px 20px 0 rgba(38, 122, 246, 0.439); /* #267af670 */
}

/* DARK Mode Specific Text Colors */
.dark .font-blue-700,
.dark .text-blue-700 {
    color: #60a9fa !important; /* Lighter blue for dark mode */
}

.dark header h2 { /* Title in the header in dark mode */
    color: #e5e7eb; /* Light gray for visibility */
}

.dark aside .text-black { /* Company name in sidebar in dark mode */
    color: #e5e7eb; /* Light gray for visibility */
}

/* DARK Mode DevExtreme TreeView Selection */
.dark .dx-treeview-item.dx-state-selected,
.dark .dx-treeview-node .dx-treeview-item.dx-state-selected {
    background: #267AF6 !important;
    color: #fff !important;
}

.dark .dx-treeview-item .dx-icon, .dark .dx-treeview-item .dx-icon:before {
    color: #60a9fa !important;
}

.dark .dx-treeview-item.dx-state-hover:not(.dx-state-selected) {
    background: #23304d !important;
    color: #60a9fa !important;
}

/* --- DEVEXTREME DATAGRID STYLES --- */
.action-dropdown {
    display: none;
    position: absolute;
    background: #fff;
    background-color: #eef2f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 9999;
    min-width: 220px;
    white-space: nowrap;
    padding: 4px 0;
    border-left: 4px solid #3b82f6;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.action-item:hover {
    background-color: #e0e7ff;
    font-weight: 500;
    color: #1e3a8a;
    box-shadow: inset 2px 0 0 #3b82f6;
}

.action-item .material-symbols-outlined {
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.action-separator {
    height: 1px;
    margin: 4px 0;
    background-color: #ddd;
}

.action-button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
}

.dx-data-row.dx-state-hover:not(.dx-selection):not(.dx-row-inserted):not(.dx-row-removed):not(.dx-edit-row) > td:not(.dx-focused) {
    background-color: #eaf6ff !important;
    color: #60a9fa !important;
    cursor: pointer;
}  

/* Selección */
.dx-data-row .dx-data-row.dx-selection {
    background-color: dodgerblue !important;
    font-weight: 500;
    color: #000;
}


/* --- DARK MODE TOGGLE SWITCH STYLES --- */
.toggle-checkbox {
    display: none;
}

.toggle-label {
    display: inline-block;
    width: 48px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 9999px;
    position: relative;
    transition: background 0.2s;
}

    .toggle-label .toggle-thumb {
        position: absolute;
        left: 2px;
        top: 2px;
        width: 20px;
        height: 20px;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.2s;
    }

.toggle-checkbox:checked + .toggle-label {
    background: #267AF6;
}

    .toggle-checkbox:checked + .toggle-label .toggle-thumb {
        transform: translateX(24px);
    }

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 991.98px) {
    .header .navbar-brand {
        margin-right: auto;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }
}
