/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.modern-table thead {
    background: linear-gradient(90deg, #364980, #f0d777); /* Dark blue → yellow */
    color: white;
}

.modern-table th,
.modern-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
}

.modern-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.3s ease;
}

.modern-table tbody tr:hover {
    background-color: #e0f2fe; /* Light blue hover */
}

.modern-table tbody td {
    color: #1f2937;
}

/* Scrollbar Styling */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: #f0f4f8;
}


/* === Table arrows (for sorting) === */
th.sortable {
    position: relative;
    cursor: pointer;
    user-select: none;
    padding-right: 1.5rem;
}

th.sortable::after {
    content: '▲';
    position: absolute;
    right: 0.5rem;
    font-size: 0.7rem;
    color: #2e2e2e; /* Yellow arrow */
    opacity: 0.3;
    transform: rotate(180deg); /* Default: descending */
    transition: transform 0.2s, opacity 0.2s;
}

th.sortable.asc::after {
    transform: rotate(0deg);
    opacity: 1;
}

th.sortable.desc::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* === Update Controls Wrapper (optional container) === */

.update-controls-container {
    margin-top: 5%;
}

.update-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* === Buttons === */
button {
    appearance: none;
    border: none;
    border-radius: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Primary / Update button */
button.update,
button[type="submit"] {
    background: linear-gradient(90deg, #364980, #1e40af);
    color: white;
}

button.update:hover,
button[type="submit"]:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* Secondary emphasis (Update All) */
button[type="submit"] {
    background: linear-gradient(90deg, #364980, #f0d777);
    color: #1f2937;
}

/* Disabled state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* === Form === */
form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* === Input Field === */
input[type="text"] {
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    min-width: 220px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.2);
}

/* Placeholder styling */
input::placeholder {
    color: #9ca3af;
}

/* === Anchor reset for button links === */
a > button {
    text-decoration: none;
}

/* === Guide Image === */
.guide-image {
    display: block;
    max-width: 40%;
    height: auto;
    border-radius: 0.25rem;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
