/* Definições de Variáveis e Reset Padrão */
:root {
    --primary-color: #0f172a;
    /* Slate 900 para textos escuros e fortes */
    --secondary-color: #06c6de;
    /* Cyan pedido: Cor de destaque  */
    --secondary-hover: #05aabf;
    --background-light: #f8fafc;
    /* Slack 50: Background extremamente suave */
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.page-landing {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-hover);
}

/* =========================================
   PÁGINA DE LOGIN
   ========================================= */

/* Background texturizado com Mesh Gradient muito sutil e moderno */
.page-login {
    background-color: var(--background-light);
    background-image:
        radial-gradient(at 0% 0%, hsla(186, 100%, 45%, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(216, 100%, 50%, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.login-container {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Efeito de borda clean/glass */
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-placeholder {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    /* Adicionando sutil gradiente no texto do logo caso seja apenas texto por enquanto */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 32px;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-light);
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(6, 198, 222, 0.1);
}

.form-control::placeholder {
    color: #94a3b8;
}

.error-msg {
    font-size: 13px;
    color: var(--danger);
    margin-top: 6px;
}

.alert-danger {
    background-color: #fef2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid #fca5a5;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(6, 198, 222, 0.25);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(6, 198, 222, 0.35);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(6, 198, 222, 0.2);
}

/* Links and Footer */
.login-footer {
    margin-top: 24px;
    text-align: center;
}

.link-forgot {
    font-size: 14px;
    font-weight: 500;
}

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */
.dashboard-body {
    background-color: var(--background-light);
    height: 100vh;
    overflow: hidden;
}

.dashboard-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-logo i {
    color: var(--secondary-color);
    font-size: 28px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover {
    color: var(--secondary-hover);
    background-color: rgba(6, 198, 222, 0.05);
}

.nav-item.active {
    color: var(--secondary-color);
    background-color: rgba(6, 198, 222, 0.1);
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

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

.avatar.small {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-form {
    display: flex;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.logout-btn:hover {
    color: var(--danger);
    background-color: #fef2f2;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--background-light);
    height: 100vh;
    overflow-y: auto;
}

/* Header */
.top-header {
    height: 72px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

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

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--secondary-color);
    background-color: rgba(6, 198, 222, 0.05);
}

.notification-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background-color: var(--danger);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 2px solid var(--white);
}

.header-user {
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

/* Content Area */
.content-area {
    padding: 32px;
    flex: 1;
}

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

.stat-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

/* =========================================
   LANDING PAGE
   ========================================= */
.page-landing {
    background-color: var(--background-light);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.page-landing .main-content {
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Navbar */
.landing-navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.landing-logo {
    display: flex;
    align-items: center;
}

.landing-logo img {
    max-height: 58px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-login-link {
    font-weight: 600;
    color: var(--primary-color);
}

.btn-login-link:hover {
    color: var(--secondary-color);
}

/* Mobile nav: hamburger (hidden on desktop) */
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.nav-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle-btn:hover {
    background: var(--border-color);
}

/* Hero Section */
.hero-section {
    padding: 180px 0 100px;
    background: radial-gradient(at 0% 0%, hsla(186, 100%, 45%, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(216, 100%, 50%, 0.05) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-text .highlight {
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.hero-text .highlight::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(6, 198, 222, 0.2);
    z-index: -1;
    border-radius: 4px;
}

.hero-text p {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-icon-composition {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto;
}

.icon-card {
    background: var(--white);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.1);
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
}

.main-icon {
    width: 240px;
    height: 240px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.main-icon i {
    font-size: 120px;
    color: var(--secondary-color);
}

.float-icon-1 {
    width: 120px;
    height: 120px;
    top: 20px;
    left: 0;
    z-index: 3;
    animation: floating 6s ease-in-out infinite;
}

.float-icon-1 i {
    font-size: 56px;
    color: #8b5cf6;
}

.float-icon-2 {
    width: 140px;
    height: 140px;
    bottom: 20px;
    right: 0;
    z-index: 1;
    animation: floating 8s ease-in-out infinite reverse;
}

.float-icon-2 i {
    font-size: 64px;
    color: #10b981;
}

@keyframes floating {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Features Section */
.features-section {
    padding: 120px 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.section-header h2 {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--background-light);
    padding: 40px 32px;
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(6, 198, 222, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon i {
    font-size: 32px;
    color: var(--secondary-color);
}

.feature-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 16px;
}

/* Footer Section */
.landing-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 40px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    align-items: start;
}

.footer-brand img {
    max-height: 40px;
    margin-bottom: 20px;
    /* Optional: filter to make logo white/bright if needed */
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-contact h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-contact p {
    margin-bottom: 24px;
}

.btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--secondary-color);
    background-color: var(--secondary-color);
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 14px;
}

/* ========== Landing: Tablet ========== */
@media (max-width: 992px) {
    .landing-container {
        padding: 0 20px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 48px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: clamp(32px, 6vw, 48px);
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand p,
    .section-header {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-brand p {
        max-width: 100%;
    }
}

/* ========== Landing: Mobile (app-like) ========== */
@media (max-width: 768px) {
    .landing-container {
        padding: 0 16px;
    }

    .nav-content {
        height: 64px;
        padding: 0 4px;
    }

    .landing-logo img {
        max-height: 44px;
    }

    .nav-toggle-btn {
        display: flex;
        order: 2;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        display: none;
        z-index: 99;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    .nav-links .btn-login-link,
    .nav-links .btn-primary {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        border-radius: 12px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links .btn-primary {
        order: -1;
    }

    /* Hero: menos padding, texto menor, CTAs em coluna */
    .hero-section {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-text h1 {
        font-size: clamp(28px, 8vw, 40px);
        margin-bottom: 16px;
    }

    .hero-text p {
        font-size: 17px;
        margin-bottom: 28px;
        line-height: 1.55;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-cta .btn-large {
        width: 100%;
        min-height: 52px;
        padding: 16px 24px;
        font-size: 17px;
        -webkit-tap-highlight-color: transparent;
    }

    .hero-image {
        order: -1;
        width: 100%;
    }

    .hero-icon-composition {
        width: min(280px, 100%);
        height: 280px;
    }

    .main-icon {
        width: 160px;
        height: 160px;
    }

    .main-icon i {
        font-size: 80px;
    }

    .float-icon-1 {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 0;
    }

    .float-icon-1 i {
        font-size: 38px;
    }

    .float-icon-2 {
        width: 96px;
        height: 96px;
        bottom: 10px;
        right: 0;
    }

    .float-icon-2 i {
        font-size: 44px;
    }

    /* Features */
    .features-section {
        padding: 56px 0;
    }

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

    .section-header h2 {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 12px;
    }

    .section-header p {
        font-size: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 20px;
    }

    .feature-icon i {
        font-size: 28px;
    }

    .feature-card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .feature-card p {
        font-size: 15px;
    }

    /* Footer */
    .landing-footer {
        padding: 48px 0 32px;
    }

    .footer-content {
        gap: 32px;
        margin-bottom: 40px;
    }

    .footer-brand img {
        max-height: 36px;
        margin-bottom: 16px;
    }

    .footer-contact .btn-outline {
        display: block;
        text-align: center;
        padding: 14px 24px;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    .footer-links a {
        padding: 8px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .footer-bottom {
        padding-top: 24px;
        font-size: 13px;
    }
}

/* ========== Landing: Small mobile (evitar scroll horizontal) ========== */
@media (max-width: 380px) {
    .landing-container {
        padding: 0 12px;
    }

    .hero-text h1 {
        font-size: 26px;
    }

    .hero-cta {
        max-width: 100%;
    }

    .hero-icon-composition {
        width: 100%;
        min-height: 240px;
        height: 240px;
    }

    .main-icon {
        width: 140px;
        height: 140px;
    }

    .main-icon i {
        font-size: 64px;
    }

    .float-icon-1 {
        width: 64px;
        height: 64px;
    }

    .float-icon-1 i {
        font-size: 30px;
    }

    .float-icon-2 {
        width: 76px;
        height: 76px;
    }

    .float-icon-2 i {
        font-size: 36px;
    }
}