/* =======================================================
   HASTA EL FINAL - ESTILOS RESPONSIVOS PROFESIONALES
   Autor: Anonymous Venezuela (2025)
   ======================================================= */

/* ------------------------------
   VARIABLES BASE
------------------------------ */
:root {
    --color-bg: #121212;
    --color-surface: #181818;
    --color-text: #e6e6e6;
    --color-accent: #ffc107;
    --radius: 10px;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    --font-main: 'Segoe UI', Roboto, sans-serif;
}

/* ------------------------------
   ESTRUCTURA GLOBAL
------------------------------ */
html, body {
    height: 100%;
    margin: 0;
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--color-accent); }

/* ------------------------------
   CONTENEDOR PRINCIPAL (main)
------------------------------ */
main.container-fluid {
    flex: 1;
    padding: 1.5rem;
    background: var(--color-surface);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ------------------------------
   CABECERA (web y móvil)
------------------------------ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    background: #1c1c1c;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.dashboard-header h4 {
    color: var(--color-accent);
    font-weight: 700;
}
.dashboard-header .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.dashboard-header .btn {
    border-radius: var(--radius);
    font-weight: 600;
}

/* ------------------------------
   TABLAS
------------------------------ */
.table {
    color: #fff;
    border-color: #333;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.04);
}
.table-striped > tbody > tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.table td, .table th {
    vertical-align: middle;
    white-space: nowrap;
}
.dataTables_wrapper {
    width: 100%;
    background: #141414;
    padding: 1rem;
    border-radius: 10px;
}
.dataTables_length select, .dataTables_filter input {
    background: #1f1f1f;
    color: #fff;
    border: 1px solid #333;
    border-radius: 6px;
}

/* ------------------------------
   BOTONES
------------------------------ */
.btn, .btn-sm {
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
    font-weight: 600;
}
.btn-warning {
    background-color: var(--color-accent);
    color: #000;
}
.btn-warning:hover {
    background-color: #ffcf40;
    transform: translateY(-1px);
}
.btn-outline-warning {
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.btn-outline-warning:hover {
    background-color: var(--color-accent);
    color: #000;
}

/* ------------------------------
   MODALES
------------------------------ */
.modal-content {
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
    animation: modalPop 0.25s ease;
}
@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ------------------------------
   FORMULARIOS
------------------------------ */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ccc;
    transition: border-color 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.1rem rgba(255,193,7,0.25);
}

/* ------------------------------
   FOOTER
------------------------------ */
footer {
    text-align: center;
    background: transparent;
    color: #bbb;
    font-size: 0.9rem;
    padding: 1rem 0 2rem;
}
footer img {
    opacity: 0.25;
    max-width: 120px;
    transition: opacity .3s;
}
footer img:hover { opacity: 0.6; }

/* ------------------------------
   VISTA DETALLE (denuncia_view)
------------------------------ */
.complaint-view-card {
    background: #fff;
    color: #212529;
    border: 3px solid var(--color-accent);
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 850px;
    margin: 1.5rem auto;
}
.complaint-view-card .card-header {
    background: var(--color-accent);
    color: #121212;
    font-weight: 700;
    border-bottom: 2px solid #e2aa00;
}
.complaint-image-container img {
    width: 100%;
    border-radius: 10px;
    border: 3px solid var(--color-accent);
}

/* ------------------------------
   RESPONSIVIDAD - MODO APP (MÓVIL)
------------------------------ */
@media (max-width: 768px) {
    html, body {
        background: linear-gradient(180deg, #0e0e0e, #181818);
        font-size: 0.92rem;
    }

    main.container-fluid {
        padding: 0.8rem;
        border-radius: 0;
        box-shadow: none;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        background: #1a1a1a;
        border-radius: 12px;
        padding: 1rem;
    }

    .dashboard-header h4 {
        text-align: center;
        font-size: 1.1rem;
    }

    .dashboard-header .actions {
        display: flex;
        justify-content: space-between;
    }

    .dashboard-header .btn {
        flex: 1;
        text-align: center;
    }

    .table-responsive {
        border-radius: 8px;
        overflow-x: auto;
        background-color: #1b1b1b;
        padding: 0.5rem;
    }

    .table td, .table th {
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .modal-dialog { margin: 0.5rem; }

    footer {
        font-size: 0.75rem;
        padding-bottom: 1.2rem;
    }

    footer img {
        max-width: 90px;
        opacity: 0.35;
    }
}

/* ------------------------------
   RESPONSIVIDAD WEB (pantallas > 1024px)
------------------------------ */
@media (min-width: 1024px) {
    body {
        background: radial-gradient(circle at top, #1b1b1b 0%, #0e0e0e 100%);
    }

    main.container-fluid {
        max-width: 1200px;
        margin: 2rem auto;
        border-radius: 14px;
        background: #1a1a1a;
        box-shadow: 0 0 30px rgba(0,0,0,0.7);
    }

    .dashboard-header {
        justify-content: space-between;
        padding: 1.2rem 2rem;
    }

    .table-responsive {
        background: #151515;
        border-radius: 12px;
        padding: 1rem;
    }

    .table td, .table th {
        font-size: 0.95rem;
    }

    footer {
        font-size: 0.85rem;
        opacity: 0.85;
    }
}

/* Cuando corre instalada como app (sin barra URL) */
@media (display-mode: standalone) {
  body { overflow: hidden; }
  .main-wrapper { height: 100dvh; min-height: 100dvh; }
}

/* Safari iOS legacy */
html.ios-standalone body { overflow: hidden; }

