/* Container */
.aw-emp-hub {
    max-width: 1200px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: #111827;
}

/* Top bar: view-as (compact, right) */
.aw-emp-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.aw-emp-viewas {
    margin: 0;
}

.aw-emp-viewas-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 10px;
}

.aw-emp-viewas-info {
    font-size: 12px;
    color: #6b7280;
}

.aw-emp-viewas select {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    background-color: #ffffff;
}

.aw-emp-viewas button {
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    background: #111827;
    color: #ffffff;
}

.aw-emp-viewas button[name="aw_emp_reset_viewas"] {
    background: #6b7280;
}

/* Tabs (for now only Employees) */
.aw-emp-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.aw-emp-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px 999px 0 0;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
}

.aw-emp-tab.is-active {
    color: #111827;
    background: #ffffff;
    border-color: #e5e7eb;
    border-bottom-color: #ffffff;
    font-weight: 600;
}

/* Layout: list + detail */
.aw-emp-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Left: list */
.aw-emp-list {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aw-emp-list h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

/* Right: detail */
.aw-emp-detail {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aw-emp-detail h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

/* Responsive widths */
@media (min-width: 900px) {
    .aw-emp-list {
        flex: 0 0 34%;
    }
    .aw-emp-detail {
        flex: 1 1 0;
    }
}

@media (max-width: 899px) {
    .aw-emp-list,
    .aw-emp-detail {
        flex: 1 1 100%;
    }
}

/* Table for employees list */
.aw-emp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.aw-emp-table thead {
    background: #f9fafb;
}

.aw-emp-table th,
.aw-emp-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.aw-emp-table th {
    font-weight: 600;
    color: #6b7280;
}

.aw-emp-table tbody tr:hover {
    background: #f3f4f6;
}

.aw-emp-table tbody tr.is-current {
    background: #eef2ff;
}

.aw-emp-table a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.aw-emp-table a:hover {
    text-decoration: underline;
}

/* Detail form */
.aw-emp-detail-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sections */
.aw-emp-section {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px 10px;
    background: #f9fafb;
    margin-bottom: 4px;
}

.aw-emp-section h4 {
    margin: 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.aw-emp-section h4 .aw-emp-section-toggle {
    font-size: 11px;
    color: #6b7280;
}

.aw-emp-section-fields {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px 16px;
}

/* Collapsed state */
.aw-emp-section.is-collapsed .aw-emp-section-fields {
    display: none;
}

/* Fields */
.aw-emp-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aw-emp-field label {
    font-size: 11px;
    color: #6b7280;
}

.aw-emp-field input[type="text"],
.aw-emp-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
}

.aw-emp-field textarea {
    min-height: 60px;
    resize: vertical;
}

/* Save button */
.aw-emp-actions {
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
}

.aw-emp-actions button[type="submit"] {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    background: #111827;
    color: #ffffff;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .aw-emp-viewas-row {
        border-radius: 10px;
    }
    .aw-emp-section-fields {
        grid-template-columns: 1fr;
    }
}
