@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Kite+One&family=Lexend+Exa:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa; 
    color: #212529;
    line-height: 1.6;
}

.container {
margin: 0 auto;
padding: 10px;
min-height: 100vh;
}

.layout-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
    margin-top: 20px; 
}

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 15px;
}

.grid {
    display: grid;
    margin-top: 10px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.flex > div {
    flex: 1; 
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Base Content Containers */
.fm {
    width: 100%;
    max-width: 600px;
    padding: 10px;
    margin: auto;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.form-box, .table-box { 
    background: white; 
    padding: 10px; 
    border-radius: 10px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

.box {
    padding: 12px;
    border-radius: 10px;
    background: azure;
    color: #333;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    color: #333;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

#menu-btn {
    z-index: 4;
    margin-left: 10px;
    font-size: 25px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

.smenu {
    position: fixed;
    top: 0;
    left: -270px; 
    width: 270px;
    height: 100%;
    overflow: auto;
    background: #06264d;
    z-index: 3;
    padding: 5px 20px;
    transition: left 0.3s ease-in-out;
}
.smenu.responsive {
    left: 0; 
}

body:has(.smenu.responsive) #menu-btn,
.smenu.responsive ~ nav #menu-btn {
    transform: translateX(200px);
    color: #fff; 
    background-color: #06264d;
    position: fixed;
}

.smenu a {
    display: block;
    margin: 14px 0;
    color: white;
    font-size: 16px;
}

.smenu img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.form-group { 
    margin-bottom: 12px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 4px; 
    font-weight: bold; 
    color: #06264d; 
    float: none; 
    margin-top: 0;
}


label {
    display: block;
    font-size: 14px;
    margin-top: 10px;
    color: #334155;
    float: left;
}

.fm input, .fm select {
    display: block;
    margin: 5px 0;
    width: 100%;
}

input, select {
    width: 100%;
    padding: 4px 5px;
    border: 1px solid #666;
    outline: none;
    border-radius: 5px;
    color: #222;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* File Inputs */
input[type="file"] {
    width: 100%;
    max-width: 450px;
    padding: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

input[type="file"]::file-selector-button {
    background-color: #06264d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background-color: #0b3a73;
}

/* Search Wrapper UI */
.search-wrapper {
    position: relative;
    display: inline-block; 
    width: 100%;
}

#aiQueryInput {
    width: 100%;
    padding: 10px 45px 10px 15px; 
    border: 1px solid #ccc;
    border-radius: 20px; 
    font-size: 14px;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

a.active {
    text-decoration: none;
    background-color: green;
}

button {
    background-color: darkblue;
    padding: 3px 10px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

input[type="submit"] {
    display: inline-block; 
    width: fit-content;
    box-sizing: border-box;
    background-color: blue;
    padding: 4px 10px; 
    color: #fff;
    border: none;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 15px; 
}

.url {
    background-color: #1d4ed8;
    padding: 3px 12px;
    color: #fff;
    border-radius: 5px;
    border: none;
    font-size: 14px;
}

.ai-btn {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: darkblue;
    color: #fff;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

th {
background-color:#D6F0C5;
color: #000;
padding: 6px;
font-weight: 600;
text-transform: uppercase;
font-size: 12px;
border: 1px solid #fff;
}

td {
padding: 6px 8px;
border: 1px solid #e2e8f0;
color: #334155;
white-space: nowrap;
}

tr:nth-child(odd) {
background-color: #f1f5f9;
}

tr:hover {
background-color: #f8fafc;
}

.editable:hover {
background-color: #f3f4f6;
cursor: pointer; 
}

.editable:focus {
background-color: #fff;
outline: 2px solid #3b82f6;
padding: 2px; 
}


th.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #888;
    color: #fff;
}

td.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;         
    background-color: #999; 
    color: #fff;
    text-decoration: underline;
}

/* Pagination Control Layouts */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 25px 0px;
}

.pagination-btn {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-indicator {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px; 
    aspect-ratio: 1 / 1; 
    border-radius: 50%;
    background: #52547A;
    color: #fff;
    font-size: 12px;
    padding: 0; 
    margin: 0 3px;
}

.success-msg, .alert { color: green; text-align: center; }
.error-msg { background: #ffeaea; color: #721c24; border: 1px solid #f5c6cb; }

.pop {
    position: fixed; 
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 600px;
    transform: translate(-50%, -50%);
    z-index: 6; 
    padding: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 5; display: none;
}

.filter-container { 
    background: #f8fafc; 
    padding: 15px; 
    border-radius: 10px; 
    border: 1px solid #e2e8f0; 
    margin-bottom: 15px; 
}

.filter-form { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    align-items: flex-end; 
}

.filter-group { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    flex: 1; 
    min-width: 140px; 
}

.filter-group label { 
    font-size: 12px; 
    font-weight: bold; 
    color: #475569; 
    text-transform: uppercase; 
    float: none; 
    margin-top: 0;
}

.vmg { margin: 10px 0; }
.he { min-height: 90vh; }
.tc { text-align: center; }

footer {
    background: #1e293b;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 10px;
    margin-top: 10px; 
}
footer p, footer a {
    margin: 4px;
    color: #fff;
}

/* ==========================================================================
   10. Media Queries
   ========================================================================== */
@media screen and (max-width: 600px) {
    .container {
        padding: 5px;
    }
    .main-grid {
        grid-template-columns: repeat(1, 1fr); 
        gap: 10px; 
    }
    .grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .box {
        padding: 8px; 
    }
    th, td {
        padding: 4px;
    }
    #m-hide {
        display: none;
    }
}