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

:root {
    --kovi-red: #FF3859;
    --kovi-white: #F4F5F7;
    --dark: #1A1D23;
    --darker: #0F1115;
    --gray: #6B7280;
    --light-gray: #9CA3AF;
    --border: #E5E7EB;
    --success: #10B981;
    --warning: #F59E0B;
    --info: #3B82F6;
    --gradient-red: linear-gradient(135deg, #FF3859 0%, #FF1744 100%);
    --gradient-dark: linear-gradient(135deg, #1A1D23 0%, #0F1115 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--kovi-white);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Animado */
.background-animated {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--gradient-dark);
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--kovi-red) 0%, transparent 70%);
    opacity: 0.05;
    animation: wave-animation 20s ease-in-out infinite;
}

.wave-1 {
    top: -50%;
    left: -50%;
    animation-delay: 0s;
}

.wave-2 {
    top: -30%;
    right: -50%;
    animation-delay: 7s;
}

.wave-3 {
    bottom: -50%;
    left: -30%;
    animation-delay: 14s;
}

@keyframes wave-animation {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
}

/* Login Box */
.login-box {
    position: relative;
    z-index: 10;
    background: white;
    width: 100%;
    max-width: 480px;
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-central {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: var(--kovi-red);
}

.logo-text h1 {
    font-size: 36px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1;
}

.logo-text span {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-subtitle {
    padding-top: 20px;
    border-top: 2px solid var(--kovi-white);
}

.header-subtitle h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.header-subtitle p {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 56, 89, 0.05) 0%, rgba(255, 56, 89, 0.1) 100%);
    border: 2px solid rgba(255, 56, 89, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.badge-icon {
    width: 20px;
    height: 20px;
}

.badge-icon svg {
    width: 100%;
    height: 100%;
    color: var(--kovi-red);
}

.security-badge span {
    font-size: 12px;
    font-weight: 700;
    color: var(--kovi-red);
    letter-spacing: 1px;
}

/* Alertas */
.alert-block {
    background: linear-gradient(135deg, rgba(255, 56, 89, 0.05) 0%, rgba(255, 56, 89, 0.1) 100%);
    border: 2px solid var(--kovi-red);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.alert-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
}

.alert-icon svg {
    width: 100%;
    height: 100%;
    color: var(--kovi-red);
}

.alert-block h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--kovi-red);
    margin-bottom: 8px;
}

.alert-block p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
}

.block-timer {
    font-size: 24px;
    font-weight: 800;
    color: var(--kovi-red);
    font-family: 'Courier New', monospace;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 2px solid var(--warning);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #92400E;
    display: none;
}

.alert-warning:not(:empty) {
    display: block;
}

.alert-error {
    background: linear-gradient(135deg, rgba(255, 56, 89, 0.05) 0%, rgba(255, 56, 89, 0.1) 100%);
    border: 2px solid var(--kovi-red);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--kovi-red);
    display: none;
    animation: shake 0.4s;
}

.alert-error:not(:empty) {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Form */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 52px 14px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--kovi-white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--kovi-red);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 56, 89, 0.1);
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
}

.toggle-password svg {
    width: 100%;
    height: 100%;
    color: var(--gray);
    transition: color 0.2s;
}

.toggle-password:hover svg {
    color: var(--kovi-red);
}

/* Loading */
.loading-state {
    text-align: center;
    padding: 24px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--kovi-white);
    border-top: 4px solid var(--kovi-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

/* Botão Login */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient-red);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(255, 56, 89, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 56, 89, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.btn-arrow {
    width: 20px;
    height: 20px;
}

/* Login Footer */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--kovi-white);
}

.security-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.info-item svg {
    width: 24px;
    height: 24px;
    color: var(--kovi-red);
}

.info-item span {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    line-height: 1.3;
}

/* Login Page Footer */
.login-page-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    margin-top: 32px;
}

.login-page-footer p {
    font-size: 12px;
    margin: 4px 0;
    opacity: 0.8;
}

/* ===== DASHBOARD ===== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--kovi-white);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    color: var(--kovi-red);
}

.sidebar-title h3 {
    font-size: 24px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -0.5px;
    line-height: 1;
}

.sidebar-title span {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    margin: 4px 16px;
    border-radius: 12px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: var(--kovi-white);
    color: var(--dark);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 56, 89, 0.1) 0%, rgba(255, 56, 89, 0.05) 100%);
    color: var(--kovi-red);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
}

.btn-logout {
    width: 100%;
    padding: 14px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

.btn-logout:hover {
    background: var(--kovi-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 24px 40px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-sm);
}

.page-title h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.page-title p {
    font-size: 14px;
    color: var(--gray);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--kovi-white);
    border-radius: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar svg {
    width: 24px;
    height: 24px;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}

.user-status {
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
}

.session-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(255, 56, 89, 0.05) 0%, rgba(255, 56, 89, 0.1) 100%);
    border: 2px solid rgba(255, 56, 89, 0.2);
    border-radius: 12px;
}

.session-indicator svg {
    width: 24px;
    height: 24px;
    color: var(--kovi-red);
}

.session-time {
    display: flex;
    flex-direction: column;
}

.session-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-timer {
    font-size: 16px;
    font-weight: 800;
    color: var(--kovi-red);
    font-family: 'Courier New', monospace;
}

/* Welcome Alert */
.welcome-alert {
    margin: 40px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid var(--success);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    color: var(--success);
    flex-shrink: 0;
}

.welcome-content h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 8px;
}

.welcome-content p {
    font-size: 15px;
    color: var(--gray);
    margin-bottom: 12px;
}

.access-time {
    font-size: 13px;
    color: var(--gray);
}

.access-time strong {
    color: var(--dark);
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 40px 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.stat-primary {
    background: var(--gradient-red);
}

.stat-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.stat-info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
}

/* Section Content */
.section-content {
    padding: 40px;
}

.section-header {
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.section-header p {
    font-size: 14px;
    color: var(--gray);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.action-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--kovi-red);
}

.action-card svg {
    width: 48px;
    height: 48px;
    color: var(--kovi-red);
    margin-bottom: 20px;
}

.action-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.action-card p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 20px;
}

.btn-action {
    padding: 12px 24px;
    background: var(--gradient-red);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 56, 89, 0.3);
}

/* Security Panel */
.security-panel {
    padding: 40px;
    background: white;
    margin: 0 40px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.security-item {
    padding: 24px;
    background: var(--kovi-white);
    border-radius: 16px;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.security-item:hover {
    border-color: var(--kovi-red);
    transform: translateY(-2px);
}

.security-item svg {
    width: 40px;
    height: 40px;
    color: var(--kovi-red);
    margin-bottom: 16px;
}

.security-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.security-item p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
}

/* Responsivo */
@media (max-width: 1024px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-nav {
        display: flex;
        padding: 12px 16px;
    }

    .nav-item {
        margin: 0 4px;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 32px 24px;
    }

    .security-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .top-bar-actions {
        flex-wrap: wrap;
    }

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

    .section-content,
    .security-panel {
        padding: 24px 20px;
    }

    .welcome-alert {
        flex-direction: column;
        text-align: center;
        margin: 20px;
        padding: 24px;
    }
}
