/* -----------------------------------------
   components.css — Buttons, Tables, Toggles
------------------------------------------ */

/* TABLE */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.15s;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* -----------------------------------------
   GLOBAL BUTTONS  
------------------------------------------ */

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* Edit icon button */
.icon-edit {
    background: #eff6ff;
    color: #1e40af;
}
.icon-edit:hover {
    background: #dbeafe;
    transform: scale(1.1);
}

/* Delete icon button */
.icon-delete {
    background: #fef2f2;
    color: #dc2626;
}
.icon-delete:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

/* -----------------------------------------
   TOGGLE SWITCH  
------------------------------------------ */

.switch {
    position: relative;
    width: 50px;
    height: 26px;
    display: inline-block;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 20px;
    transition: 0.3s;
    cursor: pointer;
}

.slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
    background-color: #10b981;
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.switch input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
