@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Work+Sans:wght@400;500;600;700&display=swap");

:root {
    --body-font: "Work Sans", "Segoe UI", sans-serif;
    --display-font: "Fraunces", serif;
    --normal-font-size: 1rem;
    --border-color-gray: #d2d7de;
    --primary-color: #3badc4;
    --primary-100: #d7edf1;
    --primary-500: #0f8ea2;
    --primary-700: #0a6675;
    --secondary-color: #17202e;
    --gray-100: #f2f5f7;
    --gray-500: #5a6576;
    --white: #ffffff;
    --surface-100: #fcfdff;
    --surface-200: #f8fafc;
    --surface-300: #f1f4f8;
    --shadow-100: rgba(16, 24, 40, 0.08);
    --shadow-200: rgba(16, 24, 40, 0.16);
    --blue-100: #e5efff;
    --blue-600: #2f56b4;
    --red-100: #fee2e2;
    --danger-500: #cb3246;
    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;
}

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

/* ------------- Estilos comunes -------------  */

body {
    position: relative;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    color: var(--secondary-color);
    transition: background-color 0.25s ease;
    height: 100dvh;
}

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

.primary-bg {
    background-color: var(--primary-color);
}

.toolbar-button {
    height: 40px;
    width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.btn.toolbar-button:hover,
.btn.add:hover {
    background: var(--primary-500);
    border-color: var(--primary-700);
    color: #fff;
    transform: translateY(-1px);
}

.download-hide {
    display: none !important;
}

/* ------------- Estilos layout -------------  */

.app-shell {
    overflow: hidden;
}

/* Permite que el area principal no sume su ancho al del navbar. */
.app-main {
    min-width: 0;
}

.contenido-shadow {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.wrapper {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.table-wrapper {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--border-color-gray);
    border-radius: var(--radius-lg);
}

.table-wrapper table {
    min-width: 720px;
}

.table-wrapper th {
    white-space: nowrap;
}

.table-wrapper td {
    max-width: 100px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.table-wrapper table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f8fc;
    color: #314053;
    border-bottom: 1px solid var(--border-color-gray);
}

.table-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #adc7d3 0%, #87a8b8 100%);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f3f8fc;
    border-radius: 999px;
}

@media screen and (max-width: 900px) {
    .toolbar .toolbar-button {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 999px;
    }

    .toolbar .toolbar-button span {
        display: none;
    }

    .toolbar .dropdown-toggle::after {
        display: none;
    }
}
