:root {
    --tgsi-navy: #062c61;
    --tgsi-navy-dark: #031f46;
    --tgsi-blue: #0d6efd;
    --tgsi-bg: #f4f6f9;
    --tgsi-border: #dee2e6;
    --tgsi-text: #172033;

    --sidebar-width: 235px;
    --topbar-height: 76px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--tgsi-bg);
    color: var(--tgsi-text);
    font-family:
            Inter,
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            sans-serif;
}


/* =========================================================
   LAYOUT
========================================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
}


/* =========================================================
   SIDEBAR
========================================================= */

.app-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;

    background:
            linear-gradient(
                    180deg,
                    var(--tgsi-navy-dark),
                    var(--tgsi-navy)
            );

    color: white;
    z-index: 1040;
}

.sidebar-brand {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-logo {
    color: #f6c344;
    font-size: 34px;
    line-height: 1;
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
}

.brand-title span {
    color: #f6c344;
}

.brand-subtitle {
    color: #f6c344;
    font-size: 11px;
}

.sidebar-nav {
    padding: 22px 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 13px 16px;
    margin-bottom: 5px;

    color: rgba(255,255,255,.86);
    text-decoration: none;

    border-radius: 8px;

    transition: .15s ease;
}

.sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255,255,255,.08);
}

.sidebar-link.active {
    color: white;
    background: rgba(45,111,214,.45);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    color: rgba(255,255,255,.7);
}


/* =========================================================
   TOPBAR
========================================================= */

.app-topbar {
    height: var(--topbar-height);

    position: sticky;
    top: 0;
    z-index: 1030;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 24px;

    background: var(--tgsi-navy-dark);
}

.topbar-search {
    position: relative;
    width: min(600px, 50%);
}

.topbar-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.7);
}

.topbar-search input {
    height: 46px;
    padding-left: 43px;

    color: white;

    border: 1px solid rgba(255,255,255,.08);

    background: rgba(255,255,255,.08);
}

.topbar-search input::placeholder {
    color: rgba(255,255,255,.55);
}

.topbar-search input:focus {
    color: white;
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
    box-shadow: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-branch {
    display: flex;
    align-items: center;
    gap: 10px;

    color: white;
    border: 1px solid rgba(255,255,255,.18);
}

.topbar-branch:hover {
    color: white;
    background: rgba(255,255,255,.08);
}

.topbar-branch span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.topbar-branch small {
    opacity: .7;
    font-size: 10px;
}

.topbar-branch strong {
    font-size: 12px;
}

.topbar-icon {
    color: white;
    font-size: 20px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.topbar-user small {
    display: block;
    opacity: .65;
}

.user-avatar {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: white;
    color: var(--tgsi-navy);

    font-weight: 700;
}


/* =========================================================
   CONTENT
========================================================= */

.app-content {
    padding: 24px;
}


/* =========================================================
   MODULE HEADER
========================================================= */

.module-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.module-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #e7f0ff;
    color: var(--tgsi-blue);

    font-size: 23px;
}


/* =========================================================
   OPERATION MINI CARDS
========================================================= */

.operation-card {
    min-width: 160px;
    cursor: pointer;
    transition: .15s ease;
}

.operation-card:hover {
    transform: translateY(-2px);
    border-color: #9ec5fe;
}

.operation-card.active {
    border-color: var(--tgsi-blue);
    box-shadow: 0 0 0 1px var(--tgsi-blue);
}


/* =========================================================
   COTIZADOR
========================================================= */

.quote-card {
    border: 1px solid var(--tgsi-border);
    box-shadow: 0 2px 7px rgba(0,0,0,.04);
}

.action-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-toolbar .btn {
    width: 66px;
    height: 54px;
    font-size: 20px;
}

.quote-title {
    font-size: 34px;
    font-weight: 800;
    color: #dc3545;
}

.quote-input {
    height: 58px;
    text-align: right;
    font-size: 30px;
    font-weight: 700;
}

.currency-label {
    font-weight: 700;
}

.tc-range {
    background: #f8fbff;
    border: 1px solid #d6e6fb;
}


/* =========================================================
   RESPONSIVE BÁSICO
========================================================= */

@media (max-width: 991px) {

    .app-sidebar {
        display: none;
    }

    .app-main {
        margin-left: 0;
    }

    .topbar-search {
        width: 60%;
    }

    .topbar-branch {
        display: none;
    }
}
