/* public/css/style.css */
/* ========================================= */
/* VARIÁVEIS GLOBAIS DE CORES & IDENTIDADE   */
/* ========================================= */
:root {
    --navbar-bg: linear-gradient(180deg, #4a0072 0%, #2a0042 100%);
    --gradient-blue: linear-gradient(135deg, #B5E0F7, #7FB2E7);
    --gradient-green: linear-gradient(135deg, #00F41C, #2DB796);
    --gradient-orange: linear-gradient(135deg, #FF8C00, #FF3D00);
    --konectomi-purple: #82389C;
    --konectomi-blue: #6C63FF;
    --base-white: #FFFBFF;
    --text-color: #333;
    --error-color: #d9534f;
    --bg-dashboard: #f4f7fa;
    --sidebar-icon-filter: brightness(0) invert(1);
    --icon-filter: brightness(0) invert(1);
}

/* ========================================= */
/* RESET BASE E FONTES                       */
/* ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');

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

body {
    background-color: var(--bg-dashboard);
    color: var(--text-color);
    overflow: hidden;
    /* Prevent full page scroll */
}

/* ========================================= */
/* ESTRUTURA E LAYOUT                        */
/* ========================================= */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: var(--navbar-bg);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    overflow-y: auto;
    /* Scroll individual para a sidebar se ficar pequena */
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.sidebar img.logo {
    height: 45px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #13E2B1, #2DB796);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: white;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: bold;
    box-shadow: inset 4px 0 0 #00F41C;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    filter: var(--sidebar-icon-filter);
    opacity: 0.8;
}

.sidebar-item:hover .sidebar-icon,
.sidebar-item.active .sidebar-icon {
    opacity: 1;
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ========================================= */
/* BOTÕES PADRÃO                             */
/* ========================================= */
.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--konectomi-purple) 0%, #9c27b0 100%);
    color: var(--base-white);
    border: none;
    box-shadow: 0 4px 10px rgba(106, 27, 154, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #7b1fa2 0%, #ab47bc 100%);
    box-shadow: 0 6px 15px rgba(106, 27, 154, 0.4);
}

.btn-success {
    background: var(--gradient-green);
    color: var(--base-white);
}

.btn-danger {
    background: var(--error-color);
    color: var(--base-white);
}

.btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #cccccc !important;
    color: #666666 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ========================================= */
/* CARDS E FORMS                             */
/* ========================================= */
.card {
    background: var(--base-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--konectomi-purple);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--konectomi-purple);
}

/* ========================================= */
/* ALERTS / BANNERS                          */
/* ========================================= */
.alert {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.alert-success {
    border-left-color: #2DB796;
    color: #1a7a63;
    background-color: #eaf8f5;
}

.alert-danger {
    border-left-color: var(--error-color);
    color: #a33;
    background-color: #fce8e8;
}

.alert-info {
    border-left-color: #4A90E2;
    color: #2c5a8e;
    background-color: #e9f3fc;
}

.alert-warning {
    border-left-color: #F5A623;
    color: #b37717;
    background-color: #fdf5e8;
}

/* Responsive basics */
@media(max-width: 768px) {
    body {
        overflow: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 1.5rem;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        padding: 1rem;
        padding-top: 5rem;
        width: 100%;
        overflow-x: hidden;
    }
}

/* Mobile Header / Hamburger Menu */
.mobile-header {
    display: none;
}

@media(max-width: 768px) {
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--navbar-bg);
        color: white;
        padding: 0.8rem 1.2rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1500;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .mobile-header .logo-text {
        font-size: 1.3rem;
    }

    .hamburger-btn {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        cursor: pointer;
        padding: 0.6rem;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger-btn img {
        width: 24px;
        height: 24px;
        filter: var(--sidebar-icon-filter);
    }

    .sidebar-close-btn {
        display: flex !important;
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: white;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 1.2rem;
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }
}

.sidebar-close-btn {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1900;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Premium Enhancements */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.gradient-text {
    background: linear-gradient(135deg, var(--konectomi-purple), var(--konectomi-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}