﻿/* =========================================================
   VARIABLES
========================================================= */

:root {
    /* COLORS */
    --primary: #002b7f;
    --primary-light: #0d6efd;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    /* RADIUS */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 25px;
    /* SHADOWS */
    --shadow-sm: 0 2px 8px rgba(0,0,0,.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,.08);
}

/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================================
   GLOBAL
========================================================= */

body {
    font-family: 'Segoe UI',sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    text-decoration: none;
}

.admin-page {
    padding: 25px;
}

/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--primary);
}

.page-subtitle {
    margin-top: 5px;
    color: var(--muted);
}

/* =========================================================
   CARDS
========================================================= */

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

/* =========================================================
   GRID
========================================================= */

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2,1fr);
}

.grid-3 {
    grid-template-columns: repeat(3,1fr);
}

.grid-full {
    grid-column: 1/-1;
}

/* =========================================================
   FORMULARIOS
========================================================= */

.form-group {
    display: flex;
    flex-direction: column;
}

.label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.form-control {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 15px;
    transition: .3s;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(0,43,127,.1);
    }

/* =========================================================
   BUTTONS
========================================================= */

.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: .3s;
    font-weight: 600;
}

    .btn:hover {
        transform: translateY(-2px);
    }

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-secondary {
    background: #eef2ff;
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 10px 12px;
}

/* =========================================================
   TABLES
========================================================= */

.table-responsive {
    overflow: auto;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
}

    .table-modern thead {
        background: var(--primary);
        color: #fff;
    }

    .table-modern th {
        padding: 15px;
        text-align: left;
        font-weight: 600;
    }

    .table-modern td {
        padding: 15px;
        border-bottom: 1px solid var(--border);
    }

    .table-modern tbody tr:hover {
        background: #f9fafb;
    }

.table-actions {
    display: flex;
    gap: 10px;
}

/*Imagen tabla*/
.img-table{
    width:70px;
    height:70px;
    object-fit:contain;
    border-radius:12px;
    background:#fff;
    border:1px solid var(--border);
    padding:5px;
}
/*Info tabla*/
.table-info h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.table-link {
    color: var(--primary);
    font-size: 13px;
    word-break: break-all;
}
/*Tabla responsive*/
.table-modern td {
    vertical-align: middle;
}
/*Responsive Movil*/
@media(max-width:768px) {

    .table-actions {
        flex-wrap: wrap;
    }

    .img-table {
        width: 55px;
        height: 55px;
    }
}

/* =========================================================
   BADGES
========================================================= */

.badge {
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* =========================================================
   TOOLBAR
========================================================= */

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    width: 350px;
    max-width: 100%;
}

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
    }

    .search-box input {
        padding-left: 45px;
    }

/* =========================================================
   FORM ACTIONS
========================================================= */

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:768px) {

    .admin-page {
        padding: 15px;
    }

    .page-title {
        font-size: 30px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .table-actions {
        flex-wrap: wrap;
    }

    .btn {
        width: 100%;
    }
}

/* =========================================================
   DETALLE
========================================================= */

/* DETAIL LAYOUT */
.detail-layout {
    align-items: start;
}

/* DETAIL IMAGE */
.detail-image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    min-height: 350px;
}

/* DETAIL IMAGE */
.img-detail {
    width: 100%;
    max-width: 320px;
    height: 320px;
    object-fit: contain;
}

/* DETAIL ITEM */
.detail-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px;
}

/* DETAIL VALUE */
.detail-value {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    color: var(--text);
    word-break: break-word;
}

@media(max-width:768px) {

    .detail-image-box {
        min-height: auto;
    }

    .img-detail {
        max-width: 220px;
        height: 220px;
    }
}

/* EDITAR */

/* EDIT LAYOUT */
.edit-layout {
    align-items: start;
}

/* EDIT IMAGE */
.edit-image-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* CHECK GRID */
.check-grid {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* CHECK ITEM */
.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

/* MARGIN TOP */
.mt-3 {
    margin-top: 20px;
}

/*ALERTAS*/
/* ALERTS */
.alert {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SUCCESS */
.alert-success-custom {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ERROR */
.alert-danger-custom {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* ACTIONS */
.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: var(--primary);
}

/* SMALL BUTTON */
.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
}


/* ACTUALIZACION NUEVO DETALLE */
.detail-card {
    padding: 35px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 22px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.grid-full {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.detail-value {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 18px;
    min-height: 58px;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #0f172a;
}

.form-actions {
    margin-top: 35px;
    display: flex;
    gap: 14px;
}

@media(max-width:768px) {

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/*  ORGANIZADOR DE GRUPO */
.detail-section {
    margin-bottom: 35px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

    .section-title i {
        color: #0b2c78;
    }