/* ==========================================================================
   Estilos Generales Compartidos
   ========================================================================== */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    color: #333;
}

.container {
    max-width: 650px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin: 30px auto;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}

/* ==========================================================================
   Alertas y Mensajes
   ========================================================================== */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Estilos de Login (login.php)
   ========================================================================== */
body.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 5px;
    margin-top: 0;
}

p.subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 20px;
}

.btn {
    background-color: #3498db;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.btn:hover {
    background-color: #2980b9;
}

/* ==========================================================================
   Estilos de Ajustes (admin_ajustes.php)
   ========================================================================== */
.container h2, .container h3 {
    color: #2c3e50;
    border-bottom: 2px solid #34495e;
    padding-bottom: 10px;
    margin-top: 0;
}

.img-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.form-box {
    background: #fdfefe;
    padding: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    margin-bottom: 20px;
}

.form-box h3 {
    margin-top: 0;
    color: #2980b9;
    font-size: 16px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.form-box label {
    margin-bottom: 8px;
    font-size: 14px;
    color: #2c3e50;
}

.form-box input, .form-box select, .form-box textarea {
    padding: 12px;
}

.btn-save {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 16px;
    margin-top: 10px;
}

.btn-save:hover {
    background: #2ecc71;
}

.current-rate {
    background: #e8f4f8;
    border-left: 4px solid #2980b9;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   Contenedor Ancho
   ========================================================================== */
.container.container-wide {
    max-width: 1100px;
}

/* ==========================================================================
   Tablas y Listados
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

th, td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

th {
    background-color: #34495e;
    color: white;
}

tr:hover {
    background-color: #f1f1f1;
}

/* ==========================================================================
   Botones de Acción en Tablas
   ========================================================================== */
.btn-action {
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    color: white;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

.btn-edit {
    background-color: #f39c12;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* ==========================================================================
   Layout de Formularios Multicolumna
   ========================================================================== */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 220px;
}

.edit-mode {
    border-color: #f39c12;
    border-style: dashed;
    background-color: #fcf3cf;
}

.btn-cancel {
    text-align: center;
    display: block;
    margin-top: 10px;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
}

.btn-cancel:hover {
    color: #333;
    text-decoration: underline;
}

.small-text {
    font-size: 12px;
    color: #7f8c8d;
    display: block;
    margin-top: 3px;
}

/* ==========================================================================
   Contenedor Adaptable adicional (90%)
   ========================================================================== */
.container.container-90 {
    max-width: 90%;
}

/* ==========================================================================
   Badges y Estados
   ========================================================================== */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}
.badge-administrador { background-color: #8e44ad; }
.badge-editor { background-color: #2980b9; }
.badge-fotografo { background-color: #16a085; }
.badge-agente { background-color: #e67e22; }
.badge-activo { background-color: #27ae60; }
.badge-suspendido { background-color: #c0392b; }

/* ==========================================================================
   Modos de Formulario y Bordes
   ========================================================================== */
.form-box {
    border: 2px dashed #bdc3c7; /* Por defecto dashed para mantener consistencia */
}
.create-mode {
    border-color: #27ae60;
    border-style: dashed;
    background-color: #e8f8f5;
}

/* ==========================================================================
   Botones Específicos
   ========================================================================== */
.btn-submit {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
}
.btn-create-color {
    background: #27ae60;
}
.btn-create-color:hover {
    background: #219150;
}
.btn-edit-color {
    background: #e67e22;
}
.btn-edit-color:hover {
    background: #d35400;
}

/* ==========================================================================
   Buscador Flotante
   ========================================================================== */
.search-bar {
    display: flex;
    gap: 15px;
    background: #fdfefe;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* ==========================================================================
   Contenedor Mediano (900px)
   ========================================================================== */
.container.container-medium {
    max-width: 900px;
}

/* ==========================================================================
   Badges de Códigos y Monospace
   ========================================================================== */
.code-badge {
    font-family: monospace;
    font-weight: bold;
    color: #e67e22;
    background: #fae5d3;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
}

/* ==========================================================================
   Badges de Rango Curatorial
   ========================================================================== */
.rank-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
    font-size: 12px;
    display: inline-block;
    text-align: center;
    min-width: 25px;
}
.rank-A { background-color: #f1c40f; color: #8a6d3b; text-shadow: 0px 1px 0px rgba(255,255,255,0.5); box-shadow: 0 0 5px rgba(241,196,15,0.5); border: 1px solid #d4ac0d; }
.rank-B { background-color: #bdc3c7; color: #2c3e50; border: 1px solid #95a5a6; }
.rank-C { background-color: #3498db; }
.rank-D { background-color: #e67e22; }
.rank-E { background-color: #95a5a6; }

/* ==========================================================================
   Contenedor del Buscador Lateral/Superior
   ========================================================================== */
.search-container {
    display: flex;
    gap: 10px;
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2980b9;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.search-container input, .search-container select {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 13px;
}


/* ==========================================================================
   Tarjetas de Detalle y Tablas Financieras (admin_serie_detallada.php)
   ========================================================================== */
.detail-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
    border-top: 4px solid #2c3e50;
}
.detail-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}
.detail-image-col {
    width: 30%;
}
.detail-info-col {
    width: calc(70% - 30px);
}
.detail-image-col img, .detail-image-col .placeholder-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.detail-image-col .placeholder-img {
    aspect-ratio: 1;
    background: #bdc3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}
.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.data-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 3px;
}
.data-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}
.finance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}
.finance-table th {
    text-align: left;
    background: #ecf0f1;
    padding: 10px;
    color: #34495e;
    border-radius: 4px 4px 0 0;
}
.finance-table td {
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
}
.finance-table .money {
    text-align: right;
    font-weight: bold;
    color: #2c3e50;
}
.finance-table .deduction {
    color: #e74c3c;
}
.finance-table .profit {
    color: #27ae60;
}

/* ==========================================================================
   Paginación Javascript
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.btn-page {
    background: #34495e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-page:hover {
    background: #2c3e50;
}

.btn-page:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: bold;
}
