/* Container & Wrapper */
.amg-wrapper {
    background: #fff;
    margin: 20px 20px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.amg-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.amg-header h1 {
    margin: 0;
    font-weight: 700;
    color: #1d2327;
    font-size: 24px;
}

.amg-subtitle {
    margin: 8px 0 0 0;
    color: #646970;
    font-size: 15px;
}

/* Card Style */
.amg-card, .amg-role-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Developer Lock Section */
.amg-lock-section {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #d63638;
    background: #fff5f5;
}

.amg-lock-section h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.amg-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Accordion Header */
.amg-accordion-header {
    padding: 15px 20px;
    background: #f6f7f7;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background 0.2s;
}

.amg-accordion-header:hover {
    background: #f0f0f1;
}

.amg-accordion-header.active {
    background: #fff;
    border-bottom: 1px solid #dcdcde;
}

.role-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-slug {
    font-weight: 400;
    font-size: 11px;
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
    color: #555;
    text-transform: uppercase;
}

/* Table Styles */
.amg-accordion-panel {
    display: none;
    padding: 0;
}

.amg-menu-table {
    width: 100%;
    border-collapse: collapse;
}

.amg-menu-table th {
    text-align: left;
    padding: 12px 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    color: #646970;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.amg-menu-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 14px;
}

.amg-menu-table tr:last-child td {
    border-bottom: none;
}

/* Indent Submenus */
.amg-sub-menu td.sub-item {
    padding-left: 45px;
    position: relative;
    color: #50575e;
    font-size: 13px;
}

.amg-sub-menu td.sub-item:before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    width: 15px;
    height: 1px;
    background: #dcdcde;
}

.amg-sub-menu td.sub-item:after {
    content: "";
    position: absolute;
    left: 20px;
    top: -50%;
    bottom: 50%;
    width: 1px;
    background: #dcdcde;
}

/* Toggle Switch */
.amg-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.amg-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.amg-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.amg-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Checked State (Red for Hidden) */
input:checked + .amg-slider.color-red {
    background-color: #d63638;
}

input:checked + .amg-slider:before {
    transform: translateX(18px);
}

/* Row Highlight when Hidden */
.is-hidden td {
    background-color: #fffbfb;
    opacity: 0.7;
}

.col-action {
    text-align: right;
    width: 60px;
}

/* Footer & Tools */
.amg-footer-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.amg-tools-section {
    margin-top: 40px;
    background: #fafafa;
    padding: 20px;
    border-radius: 6px;
    border: 1px dashed #ccc;
}