* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar: #0b1220;
    --background: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --blue: #2563eb;
    --green: #16a34a;
    --orange: #ea580c;
    --purple: #7c3aed;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input,
select {
    font-family: inherit;
}

.app {
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 22px 15px;
    background: var(--sidebar);
    color: white;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px;
    margin-bottom: 25px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    font-weight: 800;
}

.brand-name strong {
    display: block;
    font-size: 18px;
}

.brand-name span {
    display: block;
    margin-top: 3px;
    color: #60a5fa;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.company-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
}

.company-avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    font-weight: bold;
}

.company-mini strong,
.company-mini span {
    display: block;
}

.company-mini strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-mini span {
    margin-top: 3px;
    color: #64748b;
    font-size: 9px;
}

.menu {
    flex: 1;
    overflow-y: auto;
}

.menu-title {
    margin: 18px 12px 7px;
    color: #475569;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1.2px;
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 11px 13px;
    margin-bottom: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: .2s;
}

.menu-item .menu-icon {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
}

.menu-item .menu-text {
    flex: 1;
    min-width: 0;
}

.menu-item.coming-soon {
    opacity: .55;
}

.menu-item.premium-locked {
    opacity: .7;
}

.plan-lock {
    font-size: 10px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, .06);
    color: white;
}

.menu-item.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.system-online {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: #64748b;
    font-size: 10px;
}

.system-online span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.logout {
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    text-align: left;
    cursor: pointer;
}

.logout:hover {
    background: rgba(255, 255, 255, .06);
    color: white;
}

/* MAIN */

.main {
    min-height: 100vh;
    margin-left: 260px;
}

/* HEADER */

.header {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.header-left,
.header-right,
.user {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 15px;
}

.header h1 {
    font-size: 20px;
}

.header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.header-right {
    gap: 20px;
}

.mobile-menu {
    display: none;
    border: 0;
    background: transparent;
    font-size: 22px;
}

.notification {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
}

.user {
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: bold;
}

.user strong,
.user span {
    display: block;
}

.user strong {
    font-size: 11px;
}

.user span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

/* CONTENT */

.content {
    max-width: 1250px;
    margin: auto;
    padding: 35px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.eyebrow {
    color: var(--primary);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.page-heading h2 {
    margin: 7px 0;
    font-size: 27px;
    letter-spacing: -.8px;
}

.page-heading p {
    max-width: 650px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* COMPLETION */

.completion {
    width: 200px;
    flex-shrink: 0;
}

.completion-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.completion-text strong {
    font-size: 11px;
}

.completion-text span {
    color: var(--muted);
    font-size: 10px;
}

.completion-bar {
    height: 6px;
    overflow: hidden;
    border-radius: 10px;
    background: #e2e8f0;
}

.completion-progress {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,
            #2563eb,
            #60a5fa);
    transition: .3s;
}

/* ALERT */

.info-alert,
.fiscal-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px;
    margin-bottom: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}

.info-icon,
.fiscal-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #dbeafe;
    color: var(--primary);
    font-weight: bold;
}

.info-alert strong,
.fiscal-alert strong {
    display: block;
    font-size: 12px;
}

.info-alert p,
.fiscal-alert p {
    margin-top: 4px;
    color: #475569;
    font-size: 10px;
    line-height: 1.5;
}

/* CARDS */

.card {
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.section-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-weight: bold;
}

.section-icon.blue {
    background: #eff6ff;
    color: var(--blue);
}

.section-icon.purple {
    background: #faf5ff;
    color: var(--purple);
}

.section-icon.green {
    background: #f0fdf4;
    color: var(--green);
}

.section-icon.orange {
    background: #fff7ed;
    color: var(--orange);
}

.card-header h3 {
    font-size: 14px;
}

.card-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

/* FORM */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.field {
    min-width: 0;
}

.field.small {
    max-width: 200px;
}

.field.large {
    grid-column: span 2;
}

.field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 11px;
    font-weight: bold;
}

.field label span {
    color: #dc2626;
}

.field input,
.field select {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    outline: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-size: 12px;
    transition: .2s;
}

.field input:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.field small {
    display: block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 9px;
}

/* LOGO */

.logo-upload {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-preview {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-content strong {
    display: block;
    font-size: 12px;
}

.upload-content p {
    margin: 5px 0 12px;
    color: var(--muted);
    font-size: 10px;
}

.upload-button {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: #334155;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
}

.upload-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.upload-button input {
    display: none;
}

/* FISCAL */

.fiscal-alert {
    border-color: #fde68a;
    background: #fffbeb;
}

.fiscal-icon {
    background: #fef3c7;
    color: #b45309;
}

/* BOTÕES */

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 5px 0 30px;
}

.secondary-button,
.save-button {
    height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.secondary-button {
    border: 1px solid var(--border);
    background: white;
    color: #475569;
}

.save-button {
    border: 0;
    background: var(--primary);
    color: white;
}

.save-button:hover {
    background: var(--primary-dark);
}

/* RESPONSIVO */

@media (max-width: 850px) {

    .sidebar {
        transform: translateX(-100%);
        transition: .25s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .content {
        padding: 25px 20px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .completion {
        width: 100%;
    }
}

@media (max-width: 600px) {

    .header {
        padding: 0 18px;
    }

    .user div:last-child {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.large {
        grid-column: span 1;
    }

    .field.small {
        max-width: none;
    }

    .logo-upload {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .secondary-button,
    .save-button {
        width: 100%;
    }
}
/* TOAST */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: .2s;
    z-index: 1200;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #15803d;
}

.toast.error {
    background: #b91c1c;
}

.toast.info {
    background: #1d4ed8;
}




/* Barra de rolagem do menu lateral (padrão consistente com o Dashboard) */
.menu {
    scrollbar-color: rgba(148, 163, 184, .28) transparent;
    scrollbar-width: thin;
}

.menu::-webkit-scrollbar {
    width: 5px;
}

.menu::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(148, 163, 184, .28);
}

