/* Estilos Generales */
body {
    background: #0a0a0a;
    color: #fff;
    font-family: monospace;
}

input[type="text"],
input[type="number"],
select,
textarea {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 8px;
    width: 100%;
    outline: none;
    border-radius: 4px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
}

td,
th {
    padding: 10px;
    border-bottom: 1px solid #222;
    text-align: left;
}

/* Login Específico */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: #0a0a0a;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(30, 30, 80, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(60, 20, 60, 0.2) 0%, transparent 50%);
}

.login-box {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 48px 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    width: 100%;
    max-width: 380px;
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.5),
        0 0 120px rgba(30, 30, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-box .login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #1e1e50, #2a2a3a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-box h2 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #e0e0e0;
    margin-bottom: 6px;
}

.login-box .login-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 28px;
}

.login-box input[type="password"] {
    margin: 0 0 16px;
    background: #0a0a0a;
    border: 1px solid #222;
    color: white;
    padding: 14px 16px;
    width: 100%;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    letter-spacing: 2px;
    box-sizing: border-box;
}

.login-box input[type="password"]:focus {
    border-color: #444;
    box-shadow: 0 0 0 3px rgba(100, 100, 140, 0.15);
}

.login-box input[type="password"]::placeholder {
    letter-spacing: normal;
    color: #555;
}

.login-box button {
    background: linear-gradient(135deg, #e0e0e0, #ffffff);
    color: #0a0a0a;
    border: none;
    padding: 14px 16px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.15s, box-shadow 0.3s;
    box-sizing: border-box;
}

.login-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.login-box button:active {
    transform: translateY(0) scale(0.98);
}

.login-error {
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: 8px;
}

/* Subida de Imágenes y Galería */
.img-upload-container {
    display: flex;
    gap: 10px;
}

.btn-upload {
    background: #2d3277;
    color: white;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    transition: 0.2s;
}

.btn-upload:hover {
    background: #3d4287;
}

#uploadStatus {
    font-size: 0.8rem;
    margin-top: 5px;
    color: #00ff00;
}

.galeria-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.galeria-item {
    position: relative;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    width: 85px;
    display: flex;
    flex-direction: column;
}

.drag-handle {
    background: #222;
    color: #888;
    font-size: 9px;
    text-align: center;
    padding: 4px 0;
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid #444;
}

.drag-handle:active {
    cursor: grabbing;
    background: #444;
    color: white;
}

.sortable-ghost {
    opacity: 0.4;
}

.galeria-thumb {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}

.galeria-actions {
    display: flex;
    flex-direction: column;
}

.btn-action-foto {
    font-size: 10px;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    border-top: 1px solid #444;
    font-weight: bold;
}

.btn-crop {
    background: #1a1a1a;
    color: #4ade80;
}

.btn-crop:hover {
    background: #4ade80;
    color: #000;
}

.btn-del {
    background: #2a0000;
    color: #f87171;
}

.btn-del:hover {
    background: #f87171;
    color: #000;
}

/* Modales Cropper y Alertas */
.modal-crop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-crop-content {
    background: #121212;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #333;
    width: 100%;
    max-width: 600px;
}

.img-container {
    width: 100%;
    max-height: 500px;
    background: #000;
    display: block;
}

.img-container img {
    max-width: 100%;
    display: block;
}