* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.logo {
    text-align: center;
    margin-bottom: 25px;
}

.logo h1 {
    font-size: 2.5rem;
    color: #1a73e8;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
    font-size: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3);
}

.btn-success {
    background: #34a853;
    color: white;
}

.btn-success:hover {
    background: #2d8e47;
}

.btn-danger {
    background: #ea4335;
    color: white;
}

.btn-danger:hover {
    background: #d33426;
}

.btn-secondary {
    background: #f1f3f4;
    color: #444;
}

.btn-secondary:hover {
    background: #e8eaed;
}

.btn-block {
    width: 100%;
    padding: 15px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-archive {
    background: #17a2b8;
    color: white;
}

.btn-archive:hover:not(:disabled) {
    background: #138496;
}

.btn-archive:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a73e8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #444;
}

.table tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pendente {
    background: #fff3cd;
    color: #856404;
}

.badge-liberado {
    background: #d4edda;
    color: #155724;
}

.badge-bloqueado {
    background: #f8d7da;
    color: #721c24;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-top: 4px solid #1a73e8;
}

.stat-card.stat-success {
    border-top-color: #34a853;
}

.stat-card.stat-warning {
    border-top-color: #fbbc05;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a73e8;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

/* ===== CAMERA VERTICAL (9:16) ===== */
.camera-container {
    background: #1a1a2e;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 9/16;
    touch-action: none;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s ease;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
}

.recording-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(234, 67, 53, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 20;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.camera-controls .btn {
    min-width: 120px;
}

.camera-controls .btn-small {
    min-width: auto;
}

/* ===== VÍDEO GRAVADO 9:16 ===== */
#recorded-video {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

#preview-section video {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.divider {
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

/* ===== ZOOM CONTROLS ===== */
.zoom-controls {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: rgba(0,0,0,0.7);
    border-radius: 20px;
    color: white;
    font-size: 14px;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}

.zoom-controls.active {
    display: inline-flex;
}

.zoom-indicator {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
}

.btn-zoom-active {
    background: #fbbc05 !important;
    color: #333 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .video-wrapper {
        max-width: 100%;
    }

    .camera-controls .btn {
        min-width: 90px;
        font-size: 14px;
        padding: 10px 15px;
    }

    #recorded-video {
        max-width: 100%;
    }

    #preview-section video {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .camera-controls {
        gap: 10px;
    }
    
    .camera-controls .btn {
        min-width: 70px;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .btn-large {
        padding: 10px 20px;
        font-size: 14px;
    }
}