/* General Styles */
:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2c3e50;
    --danger: #e74c3c;
    --success: #2ecc71;
    --bg-color: #f4f7f6;
    --text-color: #333;
}
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-color); margin: 0; padding: 0; }

.btn { display: inline-block; background: var(--primary); color: #fff; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 14px; transition: 0.3s; }
.btn:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #27ae60; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.alert { padding: 10px; margin-bottom: 15px; border-radius: 4px; }
.alert.error { background-color: #fce4e4; color: #c0392b; border: 1px solid #fccacb; }
.alert.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Login Page */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-container { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }
.login-container h2 { margin-top: 0; text-align: center; color: var(--secondary); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
.login-container .btn { width: 100%; font-size: 16px; padding: 10px; }

/* Admin Panel */
.admin-header { background: var(--secondary); color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.admin-header h1 { margin: 0; font-size: 20px; }
.admin-header a { color: #fff; text-decoration: none; margin-left: 15px; font-size: 14px; }
.admin-header a:hover { text-decoration: underline; }

.admin-content { padding: 20px; max-width: 1200px; margin: 0 auto; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 20px; }
.card h2 { margin-top: 0; color: var(--secondary); }

table { width: 100%; border-collapse: collapse; margin-top: 15px; }
table th, table td { border-bottom: 1px solid #eee; padding: 10px; text-align: left; }
table th { background: #f9f9f9; }

/* Viewer specific (Vertical TCL S5K) */
.viewer-body { background: #000; margin: 0; overflow: hidden; width: 100vw; height: 100vh; position: relative; }
.viewer-container { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }

/* Rotación para pantallas montadas en vertical pero con SO en horizontal */
.orientation-derecha .viewer-container {
    width: 100vh;
    height: 100vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
}

.orientation-izquierda .viewer-container {
    width: 100vh;
    height: 100vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.media-item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out; }
.media-item.active { opacity: 1; z-index: 10; }
