/* Highlight the first column (Date) in the table */
th:first-child, td:first-child {
    background: #fef9c3;
    color: #92400e;
    font-weight: bold;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(180deg, #f6f8fa 0%, #eef2f7 100%);
    margin: 0;
    padding: 0;
}
.container {
    max-width: 1200px;
    margin: 32px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px 24px 24px 24px;
}
h1,
h2 {
    margin-top: 0;
    color: #2d3a4a;
    letter-spacing: 0.5px;
}
h1.page-title {
    text-align: center;
    font-size: 1.8rem;
    margin: 8px 0 20px 0;
}
.brand-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 12px;
}
.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.brand-logo {
    height: 48px;
    margin-right: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.brand-name {
    font-size: 2rem;
    color: #2d3a4a;
    font-weight: 600;
    letter-spacing: 1px;
}
h2 {
    margin-top: 0;
    color: #2d3a4a;
    letter-spacing: 1px;
}
.filters-sticky-stack {
    /* Sticky behaviour removed for mobile usability; keep as a simple wrapper */
    position: static;
}
.filters-container {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 12px;
    align-items: flex-end;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field-label {
    font-size: 0.9rem;
    color: #475569;
}
.input,
.select,
.filters-container input[type="date"],
.filters-container select#janma-rashi {
    font-size: 1rem;
    padding: 10px 12px;
    min-width: 200px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.input:focus,
.select:focus,
.filters-container input[type="date"]:focus,
.filters-container select#janma-rashi:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
    background: #fbfdff;
}
.filters-container label, .filters-container button {
    font-size: 1rem;
}
#column-filters {
    margin-bottom: 18px;
}
#column-filters > div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 8px 16px -12px rgba(0,0,0,0.25);
}
.filters-container button, button {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.filters-container button:hover, button:hover {
    background: #1741a6;
}
.filters-container #fetch-btn {
    /* Match Janma Rashi select height visually */
    font-size: 1.25rem;
    padding-top: 7px;
    padding-bottom: 7px;
    height: 44px;
}
.filters-container #export-pdf {
    /* Match Fetch button size */
    font-size: 1.25rem;
    padding-top: 7px;
    padding-bottom: 7px;
    height: 44px;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.button-primary {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border: 1px solid #1d4ed8;
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 4px 10px rgba(37, 99, 235, 0.18);
}
.button-primary:hover {
    background: linear-gradient(180deg, #2563eb, #1e40af);
}
/* (Quick date presets removed) */
table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
th, td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
th {
    /* Table header should scroll with content on small screens to avoid obscuring values */
    position: relative;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.06rem;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: #f3f6fa;
}
/* Emphasize Result column */
td[data-label="Result"] {
    font-weight: 700;
}
/* Result badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
}
.badge-positive { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-negative { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-neutral { background: #e5e7eb; color: #374151; border: 1px solid #d1d5db; }
/* Info icon button styling */
.info-btn {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
}
.info-btn:hover {
    background: #e2e8f0;
}
/* Dropdown filter styles */
#column-filters > div > div {
    margin-bottom: 0;
}
#column-filters button {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 1rem;
    margin-bottom: 4px;
}
#column-filters button:hover {
    background: #e0e7ef;
}
#column-filters div[style*="position: absolute"] {
    min-width: 180px;
}
#column-filters label {
    font-size: 0.97rem;
    color: #374151;
    margin-bottom: 2px;
}
#column-filters input[type="text"] {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 1rem;
    margin-top: 2px;
}
#column-filters input[type="checkbox"] {
    accent-color: #2563eb;
}

/* Make date and Janma Rashi inputs bigger */
.filters-container input[type="date"],
.filters-container select#janma-rashi {
        font-size: 1.25rem;
        padding: 7px 12px;
        min-width: 180px;
}

/* Responsive styles */
@media (max-width: 900px) {
    .container {
        padding: 18px 4vw 16px 4vw;
        max-width: 98vw;
    }
    h1.page-title {
        font-size: 1.4rem;
    }
    table, th, td {
        font-size: 0.98rem;
    }
    .filters-container {
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 8px 2vw 8px 2vw;
        margin: 8px 0;
        border-radius: 0;
        box-shadow: none;
    }
    h2 {
        font-size: 1.2rem;
        text-align: center;
    }
    .filters-container {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    /* Ensure labels remain visible and inputs show values clearly */
    .field-label {
        display: block;
        margin-bottom: 6px;
        color: #334155;
        font-size: 0.95rem;
    }
    .filters-container .button, .filters-container button {
        width: 100%;
        box-sizing: border-box;
    }
    .field {
        width: 100%;
    }
    .input,
    .select,
    .filters-container input[type="date"],
    .filters-container select#janma-rashi {
        min-width: 0;
        width: 100%;
    }
    #column-filters > div {
        flex-direction: column !important;
        gap: 8px !important;
    }
    #column-filters button, .filters-container button, button {
        width: 100%;
        min-width: 0;
        font-size: 1rem;
        padding: 10px 0;
    }
    #column-filters div[style*="position: absolute"] {
        min-width: 90vw;
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto;
    }
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    thead tr {
        display: none;
    }
    tr {
        margin-bottom: 12px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        padding: 8px 0;
    }
    td {
        border: none;
        border-bottom: 1px solid #e5e7eb;
        position: relative;
        padding-left: 48%;
        min-height: 36px;
        font-size: 1rem;
    }
    td:before {
        position: absolute;
        top: 0;
        left: 8px;
        width: 45%;
        white-space: pre-wrap;
        font-weight: bold;
        color: #374151;
        content: attr(data-label);
        font-size: 0.97rem;
    }
    td:last-child {
        border-bottom: none;
    }
}
