:root {
    /* Colors based on Grupo Rays & Corporate Identity */
    --primary-color: #003366;
    /* Azul profundo corporativo */
    --primary-light: #004d99;
    --accent-color: #00bfff;
    /* Cyan/Celeste tecnológico */
    --bg-color: #f4f7fa;
    --card-bg: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e0e0e0;

    /* Status Colors */
    --status-pending: #ffcc00;
    --status-progress: #3498db;
    --status-resolved: #27ae60;
    --danger-color: #e74c3c;

    /* Spacing & Layout */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    height: 100vh;
    overflow-x: hidden;
}

/* Utilities */
.view {
    display: none;
    height: 100vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}

/* Login Screen */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--bg-color) 0%, #dbeafe 100%);
}

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

.logo-img {
    max-width: 250px;
    height: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.brand-logo p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-tabs {
    display: flex;
    background: white;
    padding: 4px;
    border-radius: 50px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.tab-btn {
    padding: 8px 20px;
    border-radius: 50px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

#login-form {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 1rem;
    background: transparent;
}

.input-group input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 14px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    margin-top: 8px;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.forgot-pass {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 10px;
}

/* Dashboard Header */
.app-header {
    background: white;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-info h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-logo-container img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.btn-sos {
    background: var(--danger-color);
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.btn-logout {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-left: 10px;
}

/* Dashboard Content */
.dashboard-content {
    padding: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto;
}

.action-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 100%;
    padding: 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 16px rgba(0, 51, 102, 0.2);
    text-align: left;
}

.action-card:active {
    transform: scale(0.99);
}

.icon-circle {
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-text h3 {
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.card-text p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.section-title h4 {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* Incident List */
.incident-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.incident-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}

.incident-card:hover {
    transform: translateY(-2px);
}

.incident-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.incident-icon {
    width: 40px;
    height: 40px;
    background: #f0f4f8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.incident-details h5 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.incident-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-received {
    background: #fff3cd;
    color: #856404;
}

.status-progress {
    background: #cfe2ff;
    color: #084298;
}

.status-resolved {
    background: #d1e7dd;
    color: #0f5132;
}

/* Incident Form */
.grid-select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.type-option {
    background: white;
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.type-option i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.type-option span {
    font-size: 0.8rem;
    font-weight: 500;
}

.type-option:hover {
    background: #f9fafb;
}

.type-option.selected {
    border-color: var(--primary-color);
    background: #eef2f6;
}

.type-option.selected i {
    color: var(--primary-color);
}

.form-step {
    margin-bottom: 24px;
}

.form-step label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
    resize: none;
    font-family: inherit;
}

textarea:focus {
    outline: 1px solid var(--primary-color);
}

.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    background: white;
    cursor: pointer;
}

.file-upload:hover {
    background: #f9fafb;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

/* Executive Dashboard */
.executive-header {
    background: var(--primary-color);
    color: white;
}

.executive-header .btn-logout {
    color: white;
}

.stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: white;
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.stat-card span {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-card.pending h2 {
    color: var(--status-pending);
}

.stat-card.progress h2 {
    color: var(--status-progress);
}

.stat-card.resolved h2 {
    color: var(--status-resolved);
}

.admin-list .incident-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.admin-card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.btn-action {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-resolve {
    background: var(--status-resolved);
    color: white;
}

.btn-progress {
    background: var(--status-progress);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Responsive */
@media (min-width: 768px) {
    .dashboard-content {
        max-width: 800px;
        padding-top: 40px;
    }

    .type-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .stats-row {
        gap: 20px;
    }
}