/* ==========================================================================
   IABSHUB
   Global Application Styles
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
    /* Paleta Institucional SoMar (Extraída de somar_logo_com_slogan.png) */
    --somar-blue: #2761aa;          /* Azul Oceano Principal (Logo 'mar') */
    --somar-blue-dark: #184296;     /* Azul Oceano Escuro (Hover/Active) */
    --somar-navy: #1e3158;          /* Azul Marinho Profundo (Logo 'S', 'Azul' e Slogan) */
    --somar-navy-dark: #14223d;     /* Marinho Escuro para textos/ênfase */
    --somar-teal: #0c9f9f;          /* Ciano / Verde Água Marinho (Ícone Peixe) */
    --somar-teal-light: #e6f7f7;    /* Tint suave de ciano marinho */
    --somar-light: #edf4fc;         /* Tint suave do azul oceano (fundo ativo) */

    /* Variáveis do Sistema / Tokens Globais */
    --iabs: var(--somar-blue);
    --iabs-dark: var(--somar-navy);
    --iabs-light: var(--somar-light);
    --iabs-teal: var(--somar-teal);

    /* Cores de conteúdo */
    --ink: #1e293b;
    --muted: #64748b;

    /* Interface */
    --line: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;

    /* Estados */
    --danger: #dc2626;
    --danger-light: #fef2f2;

    --warning: #d97706;
    --warning-light: #fffbeb;

    --success: #059669;
    --success-light: #ecfdf5;

    /* Bordas */
    --border-radius-sm: 6px;
    --border-radius: 8px;
    --border-radius-md: 10px;
    --border-radius-lg: 14px;

    /* Sombras com tint suave em azul marinho */
    --shadow-sm: 0 2px 10px rgba(30, 49, 88, 0.04);
    --shadow-card: 0 5px 18px rgba(30, 49, 88, 0.05);

    /* Tipografia */
    --font-family-base: Inter, Arial, sans-serif;

    /* Layout */
    --navbar-height: 72px;
}


/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    scroll-behavior: smooth;
    min-height: 100%;

    margin: 0;

    font-family: var(--font-family-base);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;

    color: var(--ink);
    background-color: var(--bg);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.page-content {
    flex: 1 0 auto;
}
a {
    color: var(--iabs);
    text-decoration: none;
}

a:hover {
    color: var(--iabs-dark);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}


/* ==========================================================================
   3. NAVBAR
   ========================================================================== */
.navbar-iabs {
    min-height: var(--navbar-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.navbar-iabs .dropdown-toggle::after {
    display: none;
}

.navbar-iabs .dropdown-menu {
    min-width: 240px;
    margin-top: 8px;
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-card);
}

.navbar-iabs .dropdown-header {
    overflow: hidden;

    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-iabs .dropdown-item {
    padding: 8px 16px;
    color: var(--ink);
    font-size: 12px;
}

.navbar-iabs .dropdown-item:hover {
    background-color: var(--iabs-light);
    color: var(--iabs-dark);
}

.navbar-iabs .dropdown-item i {
    width: 16px;
    color: var(--muted);
    text-align: center;
}

.brand-mark {
    width: 52px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    border-radius: var(--border-radius-md);
    background-color: var(--iabs);
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
}

.brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    color: var(--somar-navy);
    font-weight: 800;
    letter-spacing: 0.4px;
}

.brand-sub {
    display: block;
    margin-top: -3px;
    color: var(--muted);
    font-size: 10px;
}

/* ==========================================================================
   4. LAYOUT
========================================================================== */
.portal-wrap {
    display: flex;
    flex: 1 0 auto;
    min-height: calc(100vh - var(--navbar-height));
}

.main {
    flex: 1 1 auto;

    width: 100%;
    max-width: 1120px;

    margin: 0 auto;

    padding: 30px 38px 90px;
}


/* ==========================================================================
   5. SIDEBAR
========================================================================== */
.sidebar {
    width: 280px;
    flex: 0 0 280px;

    position: sticky;
    top: 0;

    align-self: flex-start;

    height: calc(100vh - var(--navbar-height));

    overflow-y: auto;

    padding: 24px 16px;

    background-color: var(--white);

    border-right: 1px solid var(--line);
}

.step {
    display: flex;
    align-items: flex-start;
    padding: 11px 12px;
    margin-bottom: 5px;
    border-radius: var(--border-radius-md);
    color: #69767a;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.step:hover {
    background-color: var(--somar-light);
    color: var(--iabs-dark);
}

.step .num {
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 29px;
    margin-right: 10px;
    border: 2px solid var(--line);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.step.active {
    background-color: var(--iabs-light);
    color: var(--iabs-dark);
    font-weight: 700;
}

.step.active .num {
    border-color: var(--iabs);
    background-color: var(--iabs);
    color: var(--white);
}

.step-title {
    margin-top: 2px;
    font-size: 12px;
}

.step-desc {
    margin-top: 2px;
    color: #8a9698;
    font-size: 10px;
    font-weight: 400;
}


/* ==========================================================================
   6. PAGE HEADER
   ========================================================================== */

.top-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 25px;
}

.kicker {
    color: var(--iabs);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.page-title {
    margin: 4px 0;
    color: var(--ink);
    font-size: 27px;
    font-weight: 800;
    line-height: 1.2;
}

.lead-mini {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.6;
}


/* ==========================================================================
   7. CARDS
========================================================================== */

.card-iabs {
    margin-bottom: 20px;
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
}

.card-header-iabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background-color: var(--white);
    border-bottom: 1px solid var(--line);
}

.card-header-iabs h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.card-body-iabs {
    padding: 22px;
}


/* ==========================================================================
   8. FORMS
========================================================================== */

.form-control,
.custom-select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    font-size: 13px;
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--iabs);
    box-shadow: 0 0 0 0.15rem rgba(39, 97, 170, 0.15);
}

textarea.form-control {
    min-height: 115px;
    resize: vertical;
}

.question {
    margin-bottom: 25px;
}

.question:last-child {
    margin-bottom: 0;
}

.q-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.q-number {
    margin-right: 5px;
    color: var(--iabs);
}

.help {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.counter {
    margin-top: 4px;
    color: #879294;
    font-size: 10px;
    text-align: right;
}

/* ==========================================================================
   8.1 CUSTOM CONTROLS (RADIO & CHECKBOX)
========================================================================== */

/* Garante que os inputs nativos fiquem ocultos nos controles customizados do Bootstrap 4 */
.custom-control-input,
.custom-control input[type="radio"],
.custom-control input[type="checkbox"] {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}

.custom-control-label {
    cursor: pointer;
}

/* Cores e estados customizados alinhados à identidade SoMar */
.custom-control-input:checked ~ .custom-control-label::before,
.custom-control input[type="radio"]:checked ~ .custom-control-label::before,
.custom-control input[type="checkbox"]:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: var(--iabs, #2761aa);
    background-color: var(--iabs, #2761aa);
}

.custom-control-input:focus ~ .custom-control-label::before,
.custom-control input[type="radio"]:focus ~ .custom-control-label::before,
.custom-control input[type="checkbox"]:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(39, 97, 170, 0.25);
}

.custom-control-input:not(:disabled):active ~ .custom-control-label::before,
.custom-control input[type="radio"]:not(:disabled):active ~ .custom-control-label::before,
.custom-control input[type="checkbox"]:not(:disabled):active ~ .custom-control-label::before {
    color: #fff;
    background-color: var(--iabs-dark, #1e3158);
    border-color: var(--iabs-dark, #1e3158);
}

.custom-control input[type="checkbox"]:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.custom-control input[type="radio"]:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Card selecionável para listas de opções de formulários */
.selectable-card {
    background-color: #fafbfc;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.selectable-card:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

/* ==========================================================================
   9. FORM STATUS LABELS
========================================================================== */
.required,
.optional {
    display: inline-block;
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.required {
    background-color: var(--danger-light);
    color: var(--danger);
}

.optional {
    background-color: #eef1f0;
    color: #637174;
}

/* ==========================================================================
   10. BUTTONS
========================================================================== */
.btn-iabs {
    background-color: var(--iabs);
    border-color: var(--iabs);
    border-radius: var(--border-radius);
    color: var(--white);
    font-weight: 700;
}

.btn-iabs:hover,
.btn-iabs:focus {
    background-color: var(--iabs-dark);
    border-color: var(--iabs-dark);
    color: var(--white);
}

.btn-outline-iabs {
    border: 1px solid var(--iabs);
    border-radius: var(--border-radius);
    color: var(--iabs);
    font-weight: 700;
}

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

.btn-primary {
    background-color: var(--somar-blue);
    border-color: var(--somar-blue);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--somar-blue-dark);
    border-color: var(--somar-blue-dark);
    color: var(--white);
}

.btn-outline-primary {
    border-color: var(--somar-blue);
    color: var(--somar-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--somar-blue);
    border-color: var(--somar-blue);
    color: var(--white);
}

/* ==========================================================================
   11. ALERTS
========================================================================== */
.alert-iabs {
    background-color: var(--iabs-light);
    border: 1px solid #cce0f5;
    border-radius: var(--border-radius-md);
    color: var(--somar-navy);
    font-size: 12px;
}

.alert-warn {
    background-color: var(--warning-light);
    border: 1px solid #f2ddb5;
    border-radius: var(--border-radius-md);
    color: var(--warning);
}


/* ==========================================================================
   12. STATUS
========================================================================== */
.badge-status {
    padding: 7px 10px;
    background-color: var(--iabs-light);
    border-radius: 20px;
    color: var(--iabs-dark);
    font-size: 11px;
    font-weight: 700;
}


/* ==========================================================================
   13. TABLES
   ========================================================================== */

.table-sm td,
.table-sm th {
    vertical-align: middle;

    font-size: 12px;
}

.table thead th {
    background-color: #f6f9fc;

    border: 0;

    color: #5f6c70;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.5px;
    text-transform: uppercase;
}


/* ==========================================================================
   14. UPLOAD
   ========================================================================== */

.upload {
    padding: 18px;

    background-color: #fbfcfc;

    border: 2px dashed #cbd7e6;
    border-radius: var(--border-radius-md);

    text-align: center;
}

.upload i {
    margin-bottom: 7px;

    color: var(--iabs);

    font-size: 25px;
}

.upload-title {
    font-weight: 700;
}

.upload small {
    display: block;

    color: var(--muted);
}


/* ==========================================================================
   15. CHECK ROW
   ========================================================================== */

.check-row {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 10px 12px;

    margin-bottom: 8px;

    border: 1px solid var(--line);
    border-radius: var(--border-radius);
}

.check-row input {
    margin-top: 3px;
}


/* ==========================================================================
   16. SMALL COMPONENTS
   ========================================================================== */

.mini-title {
    margin-bottom: 10px;

    color: #61706f;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-note {
    color: var(--muted);

    font-size: 12px;

    line-height: 1.6;
}

.chip {
    display: inline-block;

    padding: 6px 9px;
    margin: 2px;

    background-color: #eef3f8;

    border-radius: 20px;

    font-size: 10px;
}

.success {
    color: var(--success);
}


/* ==========================================================================
   17. TABS
   ========================================================================== */

.iabs-tabs {
    display: flex;

    gap: 5px;

    padding: 7px;
    margin-bottom: 20px;

    background-color: var(--white);

    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);

    box-shadow: var(--shadow-card);
}

.iabs-tabs .nav-item {
    flex: 1;
}

.iabs-tabs .nav-link {
    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 62px;

    padding: 12px 14px;

    border: 0 !important;
    border-radius: var(--border-radius-md) !important;

    color: #6b777a;
}

.iabs-tabs .nav-link:hover {
    background-color: #f4f8fc;

    color: var(--iabs-dark);
}

.iabs-tabs .nav-link.active {
    background-color: var(--iabs-light);

    color: var(--iabs-dark);
}

.iabs-tabs .tab-number {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 31px;

    border: 2px solid #d8e2ec;
    border-radius: 50%;

    font-size: 11px;
    font-weight: 800;
}

.iabs-tabs .nav-link.active .tab-number {
    background-color: var(--iabs);

    border-color: var(--iabs);

    color: var(--white);
}

.iabs-tabs .nav-link span:last-child {
    display: flex;
    flex-direction: column;
}

.iabs-tabs .nav-link strong {
    font-size: 12px;
}

.iabs-tabs .nav-link small {
    margin-top: 2px;

    color: #8a9698;

    font-size: 10px;
}

.iabs-tabs .nav-link.active small {
    color: var(--somar-blue);
}


/* ==========================================================================
   18. STICKY ACTIONS
   ========================================================================== */

.sticky-actions {
    position: fixed;

    right: 0;
    bottom: 0;
    left: 280px;

    z-index: 1000;

    display: flex;
    justify-content: flex-end;

    gap: 10px;

    padding: 12px 38px;

    background-color: rgba(255, 255, 255, 0.96);

    border-top: 1px solid var(--line);
}


/* ==========================================================================
   19. FOOTER
========================================================================== */
.iabs-footer {
    background-color: var(--white);
    border-top: 1px solid var(--line);
    margin-top: auto;
}

.iabs-footer .brand-mark {
    width: 44px;
    height: 36px;
    flex: 0 0 44px;
    font-size: 15px;
}

/* ==========================================================================
   20. RESPONSIVE
========================================================================== */

@media (max-width: 900px) {

    .sidebar {
        width: 220px;
        flex-basis: 220px;
    }

    .main {
        max-width: 100%;
        padding: 22px 20px 90px;
    }

    .sticky-actions {
        left: 220px;
        padding: 12px 20px;
    }

    .top-title {
        display: block;
    }

    .top-title .badge-status {
        display: inline-block;
        margin-top: 10px;
    }

    .iabs-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .iabs-tabs .nav-item {
        min-width: 190px;
        flex: 0 0 auto;
    }
}


@media (max-width: 600px) {

    .sidebar {
        width: 72px;
        flex-basis: 72px;

        padding: 15px 8px;
    }

    .sidebar-header {
        display: none;
    }

    .step {
        justify-content: center;
        padding: 10px 5px;
    }

    .step .num {
        margin-right: 0;
    }

    .step-title,
    .step-desc {
        display: none;
    }

    .main {
        padding: 20px 12px 90px;
    }

    .sticky-actions {
        left: 72px;
        padding: 10px 12px;
    }

    .iabs-tabs .nav-link {
        min-height: 55px;
        padding: 10px;
    }

    .iabs-tabs .nav-link small {
        display: none;
    }

    .iabs-tabs .tab-number {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .card-header-iabs {
        padding: 16px;
    }

    .card-body-iabs {
        padding: 16px;
    }
}

/* ==========================================================
   AUTHENTICATION
   ========================================================== */

.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    margin-bottom: 2rem;
}

.auth-brand img,
.auth-logo {
    max-width: 180px;
    height: auto;
}

.auth-brand-name {
    font-size: 2rem;
    font-weight: 600;
}

.auth-content {
    width: 100%;
}

/* ==========================================================
   FONT SIZES
   ========================================================== */

.fs-40 { font-size: 2.5rem !important; } /* 40px */
.fs-38 { font-size: 2.375rem !important; } /* 38px */
.fs-36 { font-size: 2.25rem !important; } /* 36px */
.fs-34 { font-size: 2.125rem !important; } /* 34px */
.fs-32 { font-size: 2.0rem !important; } /* 32px */
.fs-30 { font-size: 1.875rem !important; } /* 30px */
.fs-28 { font-size: 1.75rem !important; } /* 28px */
.fs-26 { font-size: 1.625rem !important; } /* 26px */
.fs-25 { font-size: 1.5625rem !important; } /* 25px */
.fs-24 { font-size: 1.5rem !important; } /* 24px */
.fs-22 { font-size: 1.375rem !important; } /* 22px */
.fs-20 { font-size: 1.25rem !important; } /* 20px */
.fs-18 { font-size: 1.125rem !important; } /* 18px */
.fs-16 { font-size: 1.0rem !important; } /* 16px */
.fs-14 { font-size: 0.875rem !important; } /* 14px */
.fs-12 { font-size: 0.75rem !important; } /* 12px */
.fs-11 { font-size: 0.6875rem !important; } /* 11px */
.fs-10 { font-size: 0.625rem !important; } /* 10px */
.fs-9 { font-size: 0.5625rem !important; } /* 9px */
.fs-8 { font-size: 0.5rem !important; } /* 8px */

.btn-xs {
  padding: 0.125rem 0.25rem !important;
  font-size: 0.75rem !important; /* 12px - equivalente ao seu .fs-16 */
  line-height: 1.5;
  border-radius: 0.15rem;
}