@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');


:root {

    --bg: #f3f5f9;

    --white: #ffffff;

    --sidebar: #101827;

    --sidebar-hover: #1b2638;

    --text: #182230;

    --muted: #7b8798;

    --border: #e5e9f0;

    --blue: #4f46e5;

    --blue-dark: #4338ca;

    --green: #16a34a;

    --orange: #ea8b00;

    --red: #dc3545;

}


* {
    box-sizing: border-box;
}


body {

    margin: 0;

    background: var(--bg);

    color: var(--text);

    font-family: 'Inter', sans-serif;

}


/* =========================
   ESTRUCTURA
========================= */

.app {

    display: flex;

    min-height: 100vh;

}


/* =========================
   SIDEBAR
========================= */

.sidebar {

    width: 245px;

    min-height: 100vh;

    background: var(--sidebar);

    color: white;

    padding: 28px 18px;

    display: flex;

    flex-direction: column;

    position: fixed;

    left: 0;

    top: 0;

    bottom: 0;

}


.logo {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 10px;

    margin-bottom: 50px;

}


.logo-icon {

    width: 40px;

    height: 40px;

    border-radius: 11px;

    background: var(--blue);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;

}


.logo strong {

    display: block;

    font-size: 16px;

}


.logo span {

    display: block;

    font-size: 11px;

    color: #8995a8;

    margin-top: 3px;

}


nav {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.menu-item {

    width: 100%;

    border: 0;

    background: transparent;

    color: #aab4c5;

    padding: 13px 14px;

    border-radius: 9px;

    cursor: pointer;

    text-align: left;

    font-size: 14px;

    display: flex;

    align-items: center;

    gap: 12px;

    transition: .2s;

}


.menu-item span {

    width: 20px;

    text-align: center;

    font-size: 17px;

}


.menu-item:hover {

    background: var(--sidebar-hover);

    color: white;

}


.menu-item.active {

    background: var(--blue);

    color: white;

}


.sidebar-footer {

    margin-top: auto;

    color: #7f8ba0;

    font-size: 12px;

    padding: 12px 10px;

}


.status-dot {

    display: inline-block;

    width: 7px;

    height: 7px;

    background: #22c55e;

    border-radius: 50%;

    margin-right: 7px;

}


/* =========================
   MAIN
========================= */

.main {

    width: calc(100% - 245px);

    margin-left: 245px;

    padding: 35px 42px;

    max-width: 1600px;

}


/* =========================
   HEADER
========================= */

.topbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 30px;

}


.eyebrow {

    color: var(--muted);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.5px;

    margin: 0 0 7px;

}


h1 {

    margin: 0;

    font-size: 27px;

    letter-spacing: -1px;

}


.new-button {

    border: none;

    background: var(--blue);

    color: white;

    padding: 12px 18px;

    border-radius: 9px;

    font-weight: 600;

    cursor: pointer;

    transition: .2s;

}


.new-button:hover {

    background: var(--blue-dark);

    transform: translateY(-1px);

}


/* =========================
   WELCOME
========================= */

.welcome {

    background: linear-gradient(
        110deg,
        #171d35,
        #292f55
    );

    color: white;

    border-radius: 15px;

    padding: 28px 32px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    overflow: hidden;

    margin-bottom: 22px;

}


.welcome-small {

    font-size: 10px;

    letter-spacing: 1.5px;

    color: #9da8c1;

    font-weight: 700;

    margin: 0 0 8px;

}


.welcome h2 {

    margin: 0;

    font-size: 20px;

}


.welcome p:last-child {

    color: #aeb7c9;

    margin-bottom: 0;

    font-size: 13px;

}


.welcome-decoration {

    font-size: 90px;

    color: rgba(255,255,255,.05);

    transform: rotate(25deg);

    margin-right: 35px;

}


/* =========================
   ESTADISTICAS
========================= */

.stats {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 35px;

}


.stat-card {

    background: white;

    border: 1px solid var(--border);

    border-radius: 13px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

}


.stat-icon {

    width: 45px;

    height: 45px;

    border-radius: 11px;

    display: flex;

    justify-content: center;

    align-items: center;

    font-weight: bold;

    font-size: 19px;

}


.stat-icon.blue {

    background: #eef0ff;

    color: var(--blue);

}


.stat-icon.green {

    background: #eaf8ef;

    color: var(--green);

}


.stat-icon.orange {

    background: #fff4df;

    color: var(--orange);

}


.stat-card span {

    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-bottom: 4px;

}


.stat-card strong {

    font-size: 23px;

}


/* =========================
   CUENTAS
========================= */

.accounts-section {

    background: white;

    border: 1px solid var(--border);

    border-radius: 14px;

    overflow: hidden;

}


.section-header {

    padding: 24px 25px 15px;

}


.section-header h2 {

    margin: 0;

    font-size: 19px;

}


/* =========================
   FILTROS
========================= */

.filters {

    padding: 10px 25px 22px;

    display: grid;

    grid-template-columns: 1fr 190px 170px;

    gap: 12px;

}


.search-box {

    border: 1px solid var(--border);

    border-radius: 8px;

    display: flex;

    align-items: center;

    padding: 0 12px;

    color: var(--muted);

}


.search-box input {

    border: none;

    outline: none;

    width: 100%;

    padding: 11px;

    font-size: 13px;

    font-family: inherit;

}


.filters select {

    border: 1px solid var(--border);

    background: white;

    border-radius: 8px;

    padding: 11px;

    color: #4b5563;

    outline: none;

}


/* =========================
   TABLA
========================= */

.table-container {

    overflow-x: auto;

}


table {

    width: 100%;

    border-collapse: collapse;

    min-width: 1050px;

}


thead {

    background: #f8f9fc;

}


th {

    text-align: left;

    padding: 13px 20px;

    color: #8a94a6;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .8px;

    font-weight: 700;

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

}


td {

    padding: 16px 20px;

    border-bottom: 1px solid #edf0f4;

    font-size: 13px;

    color: #394454;

    vertical-align: middle;

}


tr:hover td {

    background: #fafbff;

}


.account-number {

    color: var(--blue);

    font-weight: 700;

    cursor: pointer;

}


.account-number:hover {

    text-decoration: underline;

}


.manager {

    color: #667085;

}


/* =========================
   COMENTARIOS
========================= */

.comment-cell {

    max-width: 240px;

    min-width: 180px;

    color: #667085;

    font-size: 12px;

    line-height: 1.5;

}


.comment-text {

    display: block;

    max-width: 230px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    cursor: help;

}


.comment-empty {

    color: #a0a8b5;

    font-style: italic;

}


/* =========================
   ESTADOS
========================= */

.badge {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: 700;

}


.badge.libre {

    color: #15803d;

    background: #eaf8ef;

}


.badge.usado {

    color: #b45309;

    background: #fff4df;

}


.badge-dot {

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: currentColor;

}


/* =========================
   ACCIONES
========================= */

.actions {

    display: flex;

    gap: 5px;

}


.action {

    border: 0;

    background: #f3f5f9;

    color: #5f6b7a;

    width: 30px;

    height: 30px;

    border-radius: 7px;

    cursor: pointer;

    transition: .2s;

}


.action:hover {

    background: #e6e9ef;

}


.action.delete:hover {

    background: #ffe8eb;

    color: var(--red);

}


/* =========================
   SIN RESULTADOS
========================= */

.empty {

    text-align: center;

    padding: 60px 20px;

    display: none;

}


.empty-icon {

    width: 50px;

    height: 50px;

    margin: auto;

    background: #f0f2f7;

    border-radius: 12px;

    display: flex;

    justify-content: center;

    align-items: center;

    color: #8993a3;

    font-size: 23px;

}


.empty h3 {

    margin-bottom: 5px;

}


.empty p {

    color: var(--muted);

    font-size: 13px;

}


.empty button {

    border: none;

    background: var(--blue);

    color: white;

    padding: 10px 16px;

    border-radius: 7px;

    cursor: pointer;

}


/* =========================
   MODAL
========================= */

.modal {

    position: fixed;

    inset: 0;

    background: rgba(12,18,30,.6);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 100;

}


.modal.show {

    display: flex;

}


.modal-box {

    background: white;

    width: 100%;

    max-width: 600px;

    border-radius: 15px;

    box-shadow: 0 20px 70px rgba(0,0,0,.25);

    overflow: hidden;

}


.modal-header {

    padding: 22px 25px;

    border-bottom: 1px solid var(--border);

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.modal-header h2 {

    margin: 0;

    font-size: 20px;

}


.close-button {

    width: 34px;

    height: 34px;

    border: none;

    background: #f2f4f7;

    border-radius: 7px;

    font-size: 22px;

    color: #667085;

    cursor: pointer;

}


#formCuenta {

    padding: 25px;

}


.form-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 17px;

}


.field {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


.field.full {

    grid-column: 1 / -1;

}


.field label {

    font-size: 11px;

    font-weight: 700;

    color: #475467;

}


.field input,
.field textarea {

    border: 1px solid #dce1e8;

    border-radius: 8px;

    padding: 12px;

    outline: none;

    font-family: inherit;

    font-size: 13px;

}


.field input {

    height: 43px;

}


.field textarea {

    min-height: 95px;

    resize: vertical;

    line-height: 1.5;

}


.field input:focus,
.field textarea:focus {

    border-color: var(--blue);

    box-shadow: 0 0 0 3px rgba(79,70,229,.1);

}


.modal-actions {

    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 25px;

    padding-top: 20px;

    border-top: 1px solid var(--border);

}


.cancel-button,
.save-button {

    border: none;

    padding: 11px 17px;

    border-radius: 8px;

    font-weight: 600;

    cursor: pointer;

}


.cancel-button {

    background: #f1f3f6;

    color: #667085;

}


.save-button {

    background: var(--blue);

    color: white;

}


.save-button:hover {

    background: var(--blue-dark);

}


/* =========================
   TOAST
========================= */

#toast {

    position: fixed;

    right: 25px;

    bottom: 25px;

    background: #182230;

    color: white;

    padding: 12px 18px;

    border-radius: 8px;

    font-size: 13px;

    opacity: 0;

    pointer-events: none;

    transform: translateY(15px);

    transition: .3s;

    z-index: 200;

}


#toast.show {

    opacity: 1;

    transform: translateY(0);

}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .sidebar {

        width: 75px;

        padding: 20px 10px;

    }


    .logo-text {

        display: none;

    }


    .logo {

        justify-content: center;

    }


    .menu-item {

        justify-content: center;

        font-size: 0;

    }


    .menu-item span {

        font-size: 17px;

    }


    .sidebar-footer {

        font-size: 0;

        text-align: center;

    }


    .sidebar-footer .status-dot {

        margin: 0;

    }


    .main {

        width: calc(100% - 75px);

        margin-left: 75px;

        padding: 25px;

    }


    .filters {

        grid-template-columns: 1fr;

    }

}


@media (max-width: 650px) {

    .main {

        padding: 18px;

    }


    .topbar {

        align-items: flex-start;

        gap: 15px;

        flex-direction: column;

    }


    .stats {

        grid-template-columns: 1fr;

    }


    .welcome-decoration {

        display: none;

    }


    .form-grid {

        grid-template-columns: 1fr;

    }


    .field.full {

        grid-column: auto;

    }


    .modal-actions {

        flex-direction: column-reverse;

    }


    .cancel-button,
    .save-button {

        width: 100%;

    }

}

