:root {
    --primary: #0b51c1; /* Soft vibrant blue */
    --secondary: #f0f2f5; /* Light app mobile background */
    --accent: #111111;
    --text-main: #111111;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --green-ok: #22c55e;
    --yellow-warn: #f59e0b;
    --red-critical: #ef4444;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--secondary);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Auth Pages Layout */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius);
    padding: 40px 30px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 16px;
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
    appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(11, 81, 193, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

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

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(11, 81, 193, 0.3);
}

.btn-primary:hover {
    background-color: #094098;
    box-shadow: 0 6px 12px rgba(11, 81, 193, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #f87171;
}

/* App Layout */
.app-body {
    background-color: var(--secondary);
    min-height: 100vh;
    padding-bottom: 70px; /* Space for bottom nav */
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
}

.bottom-nav a ion-icon {
    font-size: 24px;
}

.bottom-nav a.active {
    color: #3b82f6; /* Blueish active color matching image */
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #0b51c1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(11, 81, 193, 0.4);
    z-index: 90;
    cursor: pointer;
    transition: transform 0.2s;
}
.fab:hover {
    transform: scale(1.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.topbar {
    display: none;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.content-wrapper {
    padding: 10px 20px 24px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Card Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}
.btn-danger {
    background: #fef2f2;
    color: var(--red-critical);
}
.btn-danger:hover {
    background: var(--red-critical);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    /* Retirado logicas do sidebar pois agora é mobile down bottom-nav */
}

@media print {
    .sidebar, .topbar, .header-actions button, .header-actions a, .btn {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    body {
        background-color: white !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    table {
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    thead {
        display: table-header-group;
    }
}
