/* ==============================
   GLOBAL FONT
============================== */

.alm-wrapper,
.alm-wrapper * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ==============================
   WRAPPER
============================== */

.alm-wrapper {
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* ==============================
   FILTERS
============================== */

.alm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.alm-filters input,
.alm-filters select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

#alm-bulk-delete {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

#alm-bulk-delete:hover {
    opacity: 0.9;
}

/* ==============================
   TABLE CONTAINER
============================== */

.alm-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

/* ==============================
   TABLE
============================== */

.alm-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 1100px;
    background: #fff;
    table-layout: auto; /* Important change */
}

.alm-table th,
.alm-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
    text-align: left;
}

.alm-table th {
    background: #f9fafb;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

.alm-table tr:hover {
    background: #fafafa;
}

/* ==============================
   COLUMN CONTROL
============================== */

/* Checkbox column */
.alm-table th:first-child,
.alm-table td:first-child {
    width: 50px;
    text-align: center;
}

/* Client column wraps properly */
.alm-client {
    max-width: 220px;
    white-space: normal;
    word-break: break-word;
}

/* Website column shrinks to button */
.alm-website {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

/* Actions column small */
.alm-table th:last-child,
.alm-table td:last-child {
    width: 90px;
    white-space: nowrap;
    text-align: center;
}

/* ==============================
   FORM FIELDS
============================== */

.alm-table select {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #f8fafc;
}

.alm-table textarea,
.alm-table input[type="date"],
.alm-table input[type="datetime-local"] {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    width: 100%;
}

.alm-table textarea {
    min-height: 60px;
    resize: vertical;
}

/* ==============================
   OPEN BUTTON
============================== */

.alm-open-link {
    display: inline-block;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #2563eb;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.alm-open-link:hover {
    background: #2563eb;
    color: #fff;
}

/* ==============================
   PAGINATION
============================== */

#alm-pagination {
    margin-top: 20px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#alm-pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

#alm-pagination button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ==============================
   MODAL
============================== */

#alm-edit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.alm-modal-content {
    background: #fff;
    padding: 25px;
    width: 420px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.alm-modal-content h3 {
    margin-top: 0;
}

.alm-modal-content label {
    display: block;
    margin-top: 12px;
    font-weight: 500;
    font-size: 14px;
}

.alm-modal-content input,
.alm-modal-content select,
.alm-modal-content textarea {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

#alm-save-edit {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

#alm-close-edit {
    background: #e5e7eb;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 768px) {

    .alm-filters {
        flex-direction: column;
    }

    .alm-table {
        min-width: 1000px;
    }
}