/* ==========================================================================
   Aurolab Quality Systems — Room Parameters
   Teal gradient theme with animated ambient background, matching the
   reference "My Office" portal card: gradient banner + icon badge,
   rounded white body, pill-shaped gradient buttons.
   ========================================================================== */

:root {
    --teal-deep: #0B5C64;
    --teal: #0E7C82;
    --teal-bright: #14AFAA;
    --teal-tint: #E3F6F4;
    --teal-tint-strong: #CDEFEC;
    --ink: #142B2E;
    --muted: #5C7A7C;
    --surface: #FFFFFF;
    --border: #E1EDEC;
    --error: #B3261E;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #D6F3EF 0%, #E9F7F5 45%, #DCF1EE 100%);
    background-size: 200% 200%;
    animation: driftGradient 18s ease-in-out infinite;
}

@keyframes driftGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating ambient blobs -- slow, subtle, professional (not distracting) */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

.bg-blob.one {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: var(--teal-bright);
    animation: floatSlow 22s ease-in-out infinite;
}

.bg-blob.two {
    width: 360px;
    height: 360px;
    bottom: -140px;
    right: -80px;
    background: var(--teal);
    animation: floatSlow 26s ease-in-out infinite reverse;
}

.bg-blob.three {
    width: 260px;
    height: 260px;
    top: 40%;
    right: 8%;
    background: var(--teal-deep);
    opacity: 0.15;
    animation: floatSlow 30s ease-in-out infinite;
}

@keyframes floatSlow {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -40px) scale(1.05); }
    66%  { transform: translate(-20px, 30px) scale(0.97); }
    100% { transform: translate(0, 0) scale(1); }
}

.page-wrap {
    position: relative;
    z-index: 1;
    max-width: 1680px;
    margin: 0 auto;
    padding: 2.5rem 2.5rem 3rem;
}

/* ---------- Masthead + filter card (unified, matching the reference) ---------- */

.hero-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(11, 92, 100, 0.16);
    margin-bottom: 1.8rem;
}

.masthead {
    background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-bright) 100%);
    padding: 2.2rem 2rem 1.8rem;
    text-align: center;
    color: white;
}

.badge {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.9rem;
}

.badge svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
}

.subhead {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.filter-body {
    padding: 1.8rem 2rem 1.6rem;
}

/* ---------- Filter form ---------- */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.3rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    flex: 1 1 200px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap svg {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: var(--muted);
    pointer-events: none;
}

.filter-group input, .filter-group select {
    width: 100%;
    padding: 0.65rem 0.8rem 0.65rem 2.3rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    background-color: #F7FAFA;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-group input:focus, .filter-group select:focus {
    outline: none;
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 3px var(--teal-tint);
    background-color: white;
}

button#submitBtn {
    background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-bright) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.75rem 2.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(14, 124, 130, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button#submitBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(14, 124, 130, 0.4);
}

button#submitBtn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid var(--border);
    border-top-color: var(--teal-bright);
    border-radius: 50%;
    margin-left: 1rem;
    vertical-align: middle;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-msg {
    color: var(--error);
    margin-left: 1rem;
    font-weight: 600;
    font-size: 0.88rem;
}

/* ---------- Results panel ---------- */

.table-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.8rem 2rem;
    box-shadow: 0 20px 45px rgba(11, 92, 100, 0.12);
    margin-bottom: 1.6rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

#rowCount {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
}

.export-btn {
    background: var(--teal-tint);
    color: var(--teal-deep) !important;
    border-left: 3px solid var(--teal-bright);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.55rem 1.3rem;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.15s ease;
}

.export-btn:hover {
    background: var(--teal-tint-strong);
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.table-scroll::-webkit-scrollbar {
    height: 10px;
}

.table-scroll::-webkit-scrollbar-track {
    background: var(--teal-tint);
    border-radius: 8px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: var(--teal-bright);
    border-radius: 8px;
}

.aurolab-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* ---------- Data table ---------- */

#resultsTable {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    border-collapse: collapse;
}

#resultsTable thead th {
    background-color: var(--teal-tint) !important;
    color: var(--teal-deep);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left !important;
    border-bottom: 2px solid var(--teal-bright) !important;
    border-right: 1px solid var(--border) !important;
    white-space: nowrap !important;
    padding: 0.6rem 0.8rem;
}

#resultsTable tbody td {
    white-space: nowrap !important;
    padding: 0.45rem 0.8rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    color: var(--ink);
}

#resultsTable th:last-child,
#resultsTable td:last-child {
    border-right: none !important;
}

#resultsTable tbody tr:nth-child(even) {
    background-color: #FAFDFC;
}

#resultsTable tbody tr:hover {
    background-color: var(--teal-tint);
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.6rem 0.35rem 2rem;
    font-family: 'Inter', sans-serif;
    margin-left: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C7A7C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><path d='M21 21l-4.35-4.35'></path></svg>");
    background-repeat: no-repeat;
    background-position: 0.6rem center;
    background-size: 14px 14px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-family: 'Inter', sans-serif;
    margin-left: 0.4rem;
}

.table-controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.table-controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--teal) !important;
    color: white !important;
    border-color: var(--teal) !important;
    border-radius: 6px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--teal-tint) !important;
    border-color: var(--teal-bright) !important;
    color: var(--teal-deep) !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
    .bg-blob { animation: none; }
}