/* =========================================================
   TECNOPLAZA - ESTILOS GLOBALES
========================================================= */

/* =========================================================
   VARIABLES DE COLOR
========================================================= */
:root {
    --tp-red: #7F1D2D;
    --tp-red-dark: #641522;
    --tp-blue: #0361B9;
    --tp-blue-dark: #024D94;
    --tp-gray: #EAEAEC;
    --tp-white: #FFFFFF;
    --tp-dark: #1F2937;
    --tp-text-gray: #6B7280;
    --tp-background: #F5F6F8;
    --tp-border: #E1E2E5;
}

/* =========================================================
   GENERAL
========================================================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    background-color: var(--tp-background);
    color: var(--tp-dark);
    font-family: "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* =========================================================
   NAVBAR
========================================================= */
.tp-navbar {
    background-color: var(--tp-red);
    min-height: 68px;
    padding: 0 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* =========================================================
   LOGO / NOMBRE TECNOPLAZA
========================================================= */
.tp-brand {
    color: var(--tp-white) !important;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-right: 35px;
}

.tp-brand:hover {
    color: var(--tp-white) !important;
}

/* =========================================================
   MENÚ
========================================================= */
.tp-nav-link {
    color: var(--tp-white) !important;
    font-size: 15px;
    font-weight: 700;
    padding: 22px 15px !important;
    transition: all 0.2s ease;
}

.tp-nav-link:hover {
    color: #d6d6d6 !important;
    background-color: rgba(0, 0, 0, 0.08);
}

/* =========================================================
   USUARIO
========================================================= */
.tp-user-name {
    color: var(--tp-white);
    font-weight: 500;
    padding-left: 20px;
}

/* =========================================================
   BOTÓN MOBILE DEL NAVBAR
========================================================= */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* =========================================================
   CONTENIDO PRINCIPAL
========================================================= */
main {
    min-height: calc(100vh - 130px);
}

/* =========================================================
   CONTENEDOR DE PÁGINA
========================================================= */
.tp-page {
    padding: 30px;
}

/* =========================================================
   ENCABEZADO DE PÁGINA
========================================================= */
.tp-page-header {
    background-color: var(--tp-white);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 20px;
    border-left: 5px solid var(--tp-blue);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.tp-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--tp-dark);
}

.tp-page-subtitle {
    margin: 5px 0 0;
    color: var(--tp-text-gray);
}

/* =========================================================
   CARDS
========================================================= */
.tp-card {
    background-color: var(--tp-white);
    border-radius: 14px;
    border: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.tp-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--tp-border);
    font-weight: 600;
}

.tp-card-body {
    padding: 20px;
}

/* =========================================================
   FILTROS
========================================================= */
.tp-filter {
    background-color: var(--tp-white);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.tp-filter-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* =========================================================
   INPUTS
========================================================= */
.form-control,
.form-select {
    border: 2px solid var(--tp-gray);
    border-radius: 10px;
    padding: 10px 13px;
    transition: 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tp-blue);
    box-shadow: 0 0 0 3px rgba(3, 97, 185, 0.12);
}

/* =========================================================
   BOTÓN PRINCIPAL AZUL
========================================================= */
.btn-tp-primary {
    background-color: var(--tp-blue);
    color: var(--tp-white);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-tp-primary:hover {
    background-color: var(--tp-blue-dark);
    color: var(--tp-white);
    transform: translateY(-1px);
}

/* =========================================================
   BOTÓN ROJO
========================================================= */
.btn-tp-danger {
    background-color: var(--tp-red);
    color: var(--tp-white);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-tp-danger:hover {
    background-color: var(--tp-red-dark);
    color: var(--tp-white);
}

/* =========================================================
   BOTÓN SECUNDARIO
========================================================= */
.btn-tp-secondary {
    background-color: var(--tp-gray);
    color: var(--tp-dark);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-tp-secondary:hover {
    background-color: #DCDDE0;
    color: var(--tp-dark);
}

/* =========================================================
   TABLAS
========================================================= */
.tp-table-container {
    background-color: var(--tp-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.tp-table {
    margin-bottom: 0;
}

.tp-table thead th {
    background-color: var(--tp-blue);
    color: var(--tp-white);
    border: none;
    padding: 14px 15px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.tp-table tbody td {
    padding: 14px 15px;
    vertical-align: middle;
    border-color: var(--tp-border);
}

.tp-table tbody tr {
    transition: 0.15s;
}

.tp-table tbody tr:hover {
    background-color: #F4F8FC;
}

/* =========================================================
   ESTATUS
========================================================= */
.tp-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.tp-status-active {
    background-color: rgba(3, 97, 185, 0.12);
    color: var(--tp-blue);
}

.tp-status-inactive {
    background-color: rgba(247, 34, 30, 0.12);
    color: var(--tp-red);
}

/* =========================================================
   BADGES
========================================================= */
.tp-badge {
    background-color: var(--tp-gray);
    color: var(--tp-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* =========================================================
   ALERTAS
========================================================= */
.tp-alert-danger {
    background-color: rgba(247, 34, 30, 0.10);
    color: var(--tp-red);
    border: 1px solid rgba(247, 34, 30, 0.20);
    border-radius: 10px;
    padding: 12px 15px;
}

.tp-alert-primary {
    background-color: rgba(3, 97, 185, 0.10);
    color: var(--tp-blue);
    border: 1px solid rgba(3, 97, 185, 0.20);
    border-radius: 10px;
    padding: 12px 15px;
}

/* =========================================================
   MODALES
========================================================= */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--tp-border);
}

.modal-footer {
    border-top: 1px solid var(--tp-border);
}

/* =========================================================
   HOME
========================================================= */
.tp-home {
    width: 100%;
}

/* =========================================================
   HERO
========================================================= */
.tp-hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 68px);
    overflow: hidden;
    background-color: #000;
}

/* =========================================================
   IMAGEN PRINCIPAL
========================================================= */
.tp-hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* =========================================================
   CAPA SOBRE IMAGEN
========================================================= */
.tp-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.45) );
}

/* =========================================================
   TEXTO DEL HOME
========================================================= */
.tp-hero-content {
    text-align: center;
    color: var(--tp-white);
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.tp-hero-content h1 {
    font-size: clamp(45px, 6vw, 85px);
    font-weight: 700;
    margin: 0;
}

.tp-hero-content p {
    font-size: clamp(18px, 2vw, 28px);
    margin-top: 10px;
    font-weight: 400;
}

/* =========================================================
   FOOTER
========================================================= */
.tp-footer {
    background-color: var(--tp-white);
    border-top: 1px solid var(--tp-gray);
    color: var(--tp-text-gray);
    padding: 18px 0;
    margin-top: 30px;
    text-align: center;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 991px) {
    .tp-navbar {
        padding: 0 15px;
    }

    .tp-nav-link {
        padding: 12px 10px !important;
    }

    .tp-user-name {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .tp-page {
        padding: 15px;
    }

    .tp-page-title {
        font-size: 23px;
    }

    .tp-hero {
        min-height: calc(100vh - 68px);
    }

    .tp-hero-image {
        object-position: center;
    }
}

/* =========================================================
   LOGIN
========================================================= */
.tp-login-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient( 135deg, var(--tp-red), var(--tp-blue) );
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   CONTENEDOR
========================================================= */
.tp-login-container {
    width: 100%;
    max-width: 430px;
    padding: 20px;
}

/* =========================================================
   CARD
========================================================= */
.tp-login-card {
    background-color: var(--tp-white);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.20);
}

/* =========================================================
   HEADER
========================================================= */
.tp-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.tp-login-header h1 {
    margin: 0;
    color: var(--tp-red);
    font-size: 32px;
    font-weight: 700;
}

.tp-login-header p {
    margin-top: 8px;
    margin-bottom: 0;
    color: var(--tp-text-gray);
}

/* =========================================================
   INPUTS
========================================================= */
.tp-login-card .form-control {
    height: 48px;
}

/* =========================================================
   BOTÓN
========================================================= */
.tp-login-button {
    width: 100%;
    height: 48px;
    font-size: 15px;
}

/* =========================================================
   ERRORES
========================================================= */
.tp-login-error {
    color: var(--tp-red);
    font-size: 14px;
    margin-bottom: 15px;
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 480px) {

    .tp-login-card {
        padding: 30px 25px;
    }
}

.tp-user-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* =========================================================
   USUARIOS
========================================================= */
.tp-user-name {
    color: white;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: default;
}

.tp-user-name:hover {
    color: #d6d6d6;
}

.tp-logout {
    color: white;
    font-weight: 700;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tp-logout:hover {
    color: #d6d6d6;
    transform: translateY(-1px);
}

.tp-user-name i,
.tp-logout i {
    color: inherit;
    transition: all 0.2s ease;
}

/* =========================================================
   ARRENDATARIOS
========================================================= */
.btn-view-premises {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-view-premises i {
    font-size: 17px;
}

/* =========================================================
   MODAL GLOBAL DE MENSAJES
========================================================= */

.tp-message-modal {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.tp-message-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.tp-message-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.tp-message-text {
    margin-bottom: 24px;
    line-height: 1.5;
}

.tp-message-icon.tp-message-success {
    background-color: #d1e7dd;
    color: #198754;
}

.tp-message-icon.tp-message-error {
    background-color: #f8d7da;
    color: #dc3545;
}

.tp-message-icon.tp-message-warning {
    background-color: #fff3cd;
    color: #ffc107;
}

.tp-message-icon.tp-message-info {
    background-color: #cff4fc;
    color: #0dcaf0;
}

/* =========================================================
   DASHBOARD
========================================================= */
.dashboard-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-card-potential {
    border-left: 5px solid #0361B9 !important;
}

.dashboard-card-rented {
    border-left: 5px solid #198754 !important;
}

.dashboard-card-receivable {
    border-left: 5px solid #F7221E !important;
}

.dashboard-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EAEAEC;
    font-size: 1.35rem;
}

.dashboard-table thead th {
    background: #f7f7f8;
    border-bottom: 1px solid #dee2e6;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
    white-space: nowrap;
}

.dashboard-type-row {
    cursor: pointer;
}

.dashboard-type-row:hover {
    background-color: #f8f9fa;
}

.dashboard-chevron {
    transition: transform .2s ease;
}

.dashboard-type-row[aria-expanded="true"] .dashboard-chevron {
    transform: rotate(90deg);
}

.dashboard-detail-wrapper {
    background: #f7f8fa;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px;
}

.dashboard-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
}

.detail-title {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-legend {
    display: flex;
    gap: 18px;
    font-size: .8rem;
    color: #6c757d;
}

.dashboard-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.status-current {
    background: #198754;
}

.status-dot.status-debt {
    background-color: #DC2626;
}

.status-vacant {
    background: #0361B9;
}

.status-inactive {
    background: #495057;
}

.dashboard-detail-table {
    table-layout: fixed;
    min-width: 1100px;
}

.dashboard-detail-table > thead > tr > th {
    width: 25%;
    padding: 12px;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 2px solid #dee2e6;
}

.detail-column-current,
.detail-column-debt,
.detail-column-vacant,
.detail-column-inactive {
    vertical-align: top;
    padding: 10px !important;
}

.detail-premise-card {
    padding: 13px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: white;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.detail-premise-card:last-child {
    margin-bottom: 0;
}

.current-card {
    border-left-color: #198754;
}

.debt-warning-card {
    border-left-color: #ffc107;
    background: #fffdf4;
}

.debt-danger-card {
    border-left-color: #dc3545;
    background: #fff7f7;
}

.vacant-card {
    border-left-color: #0361B9;
    background: #f5f9ff;
}

.inactive-card {
    border-left-color: #495057;
    background: #f3f4f5;
}

.detail-local {
    font-weight: 700;
    font-size: .95rem;
    color: #212529;
}

.detail-tenant {
    font-size: .83rem;
    color: #6c757d;
    margin-top: 2px;
}

.vacant-label {
    color: #0361B9;
    font-weight: 600;
}

.inactive-label {
    color: #495057;
    font-weight: 600;
}

.detail-values {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #e9ecef;
    font-size: .78rem;
    color: #6c757d;
}

.detail-values strong {
    color: #343a40;
}

.detail-reason {
    font-size: .78rem;
    color: #6c757d;
    margin-top: 8px;
    line-height: 1.4;
}

@@media (max-width: 992px) {
    .dashboard-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-legend {
        flex-wrap: wrap;
    }
}

/* =========================================================
   MODALES ENCIMADOS - GASTOS
========================================================= */
#expenseDetailsModal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1040;
}

#expenseSummaryModal {
    z-index: 1050;
}