.app-header {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-top: 0;
    position: relative;
    width: 100%;
}

.header-actions {
    padding-top: 1rem;
    justify-self: start;
}

.header-title {
    grid-column: 2;
    justify-self: center;
}

.app-header #logoutBtn {
    justify-self: end;
    position: static !important;
}

.last-built-at {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.filter-row {
    align-items: end;
    box-sizing: border-box;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
    padding-top: 1rem;
    width: 100%;
}

.filter-field {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem;
    min-width: 0;
}

.filter-field .form-label {
    flex: 0 0 auto;
    font-size: 0.9rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.filter-field .form-select {
    min-width: 0;
    width: 100%;
}

#actionButtons {
    margin-bottom: 0.5rem;
}

.scraper-card {
    border-top: 4px solid #fdb338;
    max-width: min(90vw, 420px);
    padding: 2rem;
    text-align: center;
    width: 100%;
    z-index: 2001;
}

/*
This file is now empty. All styling is handled by Bootstrap 5 via CDN.
If you need custom overrides, add them below.
*/

/*
Custom styles for login page layout and logo responsiveness
*/
.login-logo {
    max-width: 640px;
    max-height: 240px;
    width: 80vw;
    height: auto;
}
@media (max-width: 767.98px) {
    .app-header {
        align-items: stretch;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .header-actions {
        align-items: flex-start;
        flex: 0 0 auto;
        margin-top: 0.5rem;
        order: 2;
    }

    .header-title {
        order: 1;
    }

    .app-header #logoutBtn {
        position: absolute !important;
        right: 0;
        top: 0;
    }

    .login-outer {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Increased top padding for more whitespace above logo */
        padding-top: 7vh;
    }
    .login-logo {
        margin-top: 3rem; /* Restore to previous value for balanced spacing */
        margin-bottom: 5.5rem;
        max-width: 90vw;
        max-height: 240px;
    }
}
@media (min-width: 768px) {
    .login-outer {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

/*
Custom styles for tables
*/
.table-scroll-wrapper {
    overflow-y: auto;
    max-height: 60vh;
    min-height: 200px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1.5px 4px rgba(0,0,0,0.04);
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    margin-bottom: 1rem;
}
.table {
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0;
    background: transparent;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffe066;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    border-top: none;
    font-weight: 700;
    font-size: 1.05rem;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}
.table-striped > tbody > tr:nth-of-type(even) {
    background-color: #fff;
}
.table-hover tbody tr:hover {
    background-color: #ffe06633;
    transition: background 0.2s;
}
.table th, .table td {
    vertical-align: middle;
    border: none;
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
}
.cajas-highlight {
    background: #ffe066 !important;
    font-weight: bold;
    border-radius: 0.5rem;
    border: 1.5px solid #ffe066;
    box-shadow: none;
}

.table-striped > tbody > tr.cajas-highlight-row > td {
    font-weight: 600;
}

.pagination-controls {
    margin-top: 0.5rem;
    gap: 0.5rem;
}
.pagination-controls .btn {
    border-radius: 0.5rem;
    min-width: 90px;
    font-weight: 500;
    background: #fff;
    border: 1.5px solid #ffe066;
    color: #b8860b;
    transition: background 0.15s, color 0.15s, border 0.15s;
}
.pagination-controls .btn:disabled {
    background: #f8f9fa;
    color: #ccc;
    border-color: #eee;
    opacity: 1;
}
.pagination-controls .btn:not(:disabled):hover {
    background: #ffe066;
    color: #333;
    border-color: #ffd43b;
}
.table-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
    background: #f8f9fa;
    border-radius: 1rem;
}
.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 1rem;
}

@media (max-width: 767.98px) {
    body {
        overflow-x: hidden;
    }

    .container {
        max-width: 100%;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .last-built-at {
        padding-right: 0;
        text-align: center !important;
    }

    #logoutBtn .logout-label {
        display: none;
    }

    #logoutBtn .bi {
        margin-right: 0 !important;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .filter-field {
        grid-template-columns: 5rem minmax(0, 1fr);
    }

    #actionButtons {
        margin-top: 0.75rem;
    }

    #tableContainer {
        overflow-x: auto;
        padding: 0.5rem !important;
    }

    #tableContainer .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
    }

    #tableContainer .nav-tabs .nav-item {
        flex: 0 0 auto;
    }

    #tableContainer .table {
        min-width: 0;
        width: 100%;
    }

    #tableContainer .table th,
    #tableContainer .table td {
        white-space: nowrap;
    }
}
