:root {
    --primary: #2563eb;
    --danger: #dc2626;
    --dark: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --border: #e5e7eb;
    --row-alt: #f9fafb;
    --row-hover: #eef2ff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    padding: 20px;
    color: var(--dark);
}

/* PAGE HEADER */
.page-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--muted);
    margin-bottom: 18px;
}

/* TABLE WRAPPER */
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    overflow-x: auto;
}

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

.modern-table thead {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    color: #fff;
}

.modern-table th {
    text-align: left;
    padding: 10px 12px;               /* reduced spacing */
    font-size: 12px;
    letter-spacing: .6px;
    text-transform: uppercase;
}

/* TABLE BODY */
.modern-table td {
    padding: 8px 12px;                /* compact rows */
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
}

/* ROW COLORS */
.modern-table tbody tr {
    background: #fff;
}

.modern-table tbody tr:nth-child(even) {
    background: var(--row-alt);
}

.modern-table tbody tr:hover {
    background: var(--row-hover);
    transition: background .15s ease-in-out;
}

/* PHONE STACK */
.modern-table td br {
    line-height: 0.9;
}

/* AGGRESSIVE EDIT BUTTON */
.btn-edit {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border: none;
    padding: 6px 12px;                /* slightly smaller */
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(220,38,38,0.35);
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220,38,38,0.45);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.75);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.modal-content {
    background: #fff;
    width: 420px;
    max-width: 92%;
    margin: 8% auto;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-bottom: 14px;
    font-size: 19px;
}

.modal-content label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.modal-content input {
    width: 100%;
    padding: 9px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 13px;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary);
}

/* MODAL ACTIONS */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.modal-actions button {
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 13px;
}

.modal-actions button[type="submit"] {
    background: var(--primary);
    color: #fff;
}

.modal-actions button[type="button"] {
    background: #e5e7eb;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .page-title {
        font-size: 22px;
    }

    .modern-table {
        min-width: unset;
    }

    .btn-edit {
        width: 100%;
        text-align: center;
    }
}

/* SEARCH BAR */
.search-bar {
    margin-bottom: 14px;
}

.search-bar input {
    width: 100%;
    max-width: 420px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}


/* MODERN MODAL */
.modern-modal {
    padding: 0;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.form-group {
    padding: 14px 20px 0;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.form-group input {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-actions {
    padding: 18px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background: #e5e7eb;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}
