:root {
    --primary: #0f172a;    /* Slate 950 */
    --primary-light: #1e293b;
    --accent: #f59e0b;     /* Amber 500 */
    --accent-hover: #d97706;
    --bg-main: #f1f5f9;    /* Slate 100 */
    --bg-card: #ffffff;
    --bg-sidebar: #020617; /* Slate 950 deeper */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 28px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    padding: 1.25rem;
    gap: 1.25rem;
}

/* Sidebar Estilo React Prototype */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 2.5rem);
    position: sticky;
    top: 1.25rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    z-index: 1000;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Visibility classes for Toggle */
#sidebar-toggle {
    display: none;
}

@media (max-width: 1024px) {
    #sidebar-toggle {
        display: flex;
    }
    #sidebar-close {
        display: block;
    }
    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        border-radius: 0;
        z-index: 2000;
    }
    .sidebar.open {
        left: 0;
    }
}

.brand-sub {
    font-size: 0.875rem;
    color: #94a3b8;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-link:hover {
    background-color: #0f172a;
    color: white;
}

.menu-link.active {
    background-color: white;
    color: var(--primary);
}

.menu-link i {
    width: 18px;
    font-size: 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-left h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.header-left p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Cards e Elementos UI */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    border: none;
}

.stat-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #334155;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Botões */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: #1e293b;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
}

/* Badges e Status */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-alta, .badge-urgente { background: #fee2e2; color: #991b1b; }
.badge-media { background: #fef3c7; color: #92400e; }
.badge-baixa { background: #f1f5f9; color: #334155; }

/* Login Split Screen Style */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    padding: 1rem;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1000px;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-brand-side {
    background-color: var(--bg-sidebar);
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand-side h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 0.5rem;
    letter-spacing: -0.025em;
}

.login-brand-side p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.brand-demo-box {
    background: #0f172a;
    padding: 1.5rem;
    border-radius: 24px;
    margin-top: 2rem;
}

.login-form-side {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-side h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    .login-brand-side {
        display: none;
    }
}

/* Modais */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -300px;
        height: 100vh;
        top: 0;
        border-radius: 0;
    }
    .sidebar.open {
        left: 0;
    }
    .app-container {
        padding: 0.75rem;
    }
}

.hidden { display: none !important; }

/* Custom Profile Circle */
.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
