/* User Type Management - Dark Theme Styles */
/* Card UI matches GlobalMenuBuilder category cards */

/* ── Page Container ─────────────────────────────────────────────── */
.utm-page {
    background: #0F1412;
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* ── List Header ─────────────────────────────────────────────────── */
.utm-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #0F1412;
    border-bottom: 2px solid #2E2E2E;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.utm-header-info {
    flex: 1;
    min-width: 0;
}

.utm-header-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.utm-header-title i {
    color: #2DD4BF;
    font-size: 1.125rem;
}

.utm-header-subtitle {
    color: #6B7280;
    font-size: 0.813rem;
}

/* ── Search Bar ──────────────────────────────────────────────────── */
.utm-search-bar {
    padding: 0.75rem 1.25rem;
    border-bottom: 2px solid #2E2E2E;
}

.utm-search-wrap {
    position: relative;
    max-width: 380px;
}

.utm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.813rem;
    color: #6B7280;
    pointer-events: none;
}

.utm-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.625rem;
    color: #fff;
    font-size: 0.875rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.utm-search-input:focus {
    border-color: #2DD4BF;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.08);
}

/* ── Card Grid ────────────────────────────────────────────────────── */
.utm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 1.25rem;
}

/* ── Card — layout matching GlobalMenuBuilder ──────────── */
.utm-card {
    background: #1A1D1C;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    cursor: pointer;
    border: none;
}

.utm-card:hover {
    transform: translateY(-4px);
}

.utm-card *,
.utm-card *::before,
.utm-card *::after {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

.utm-card-top,
.utm-card-info,
.utm-card-badge {
    background: transparent !important;
}

/* ── Card Top Row — icon aligned with title ──────────────────────── */
.utm-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.utm-card-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.utm-card-info {
    flex: 1;
    min-width: 0;
}

.utm-card-title {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.25;
}

.utm-card-desc {
    color: #A3A3A3;
    font-size: 14px;
    line-height: 1.4;
}

.utm-card-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #252927;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    border: none;
}

/* ── Card Actions — split buttons matching GlobalMenuBuilder ────── */
.utm-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.utm-btn--edit {
    flex: 1;
    padding: 10px;
    background: #252927;
    border: 1px solid #2E2E2E;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.utm-btn--edit:hover {
    background: #2E2E2E;
}

.utm-btn--modules {
    flex: 1;
    padding: 10px;
    background: #252927;
    border: 1px solid #2E2E2E;
    border-radius: 12px;
    color: #2DD4BF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.utm-btn--modules:hover {
    background: #2E2E2E;
}

.utm-btn--delete {
    flex: 1;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #EF4444;
    border-radius: 12px;
    color: #EF4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.utm-btn--delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── Detail View ──────────────────────────────────────────────────── */
.utm-detail-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #0F1412;
    border-bottom: 2px solid #2E2E2E;
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.utm-detail-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.utm-detail-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid;
    flex-shrink: 0;
}

.utm-detail-title {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
}

.utm-detail-subtitle {
    color: #A3A3A3;
    font-size: 0.75rem;
}

.utm-detail-id {
    color: #6B7280;
    font-size: 0.75rem;
    flex-shrink: 0;
    background: #1A1D1C;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #2E2E2E;
}

.utm-detail-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.25rem;
}

.utm-detail-loading {
    text-align: center;
    padding: 2rem;
    color: #A3A3A3;
}

.utm-detail-loading-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: #2DD4BF;
}

/* ── Module Panel ─────────────────────────────────────────────────── */
.utm-module-panel {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.875rem;
    padding: 1.5rem;
}

.utm-module-panel-header {
    margin-bottom: 1.25rem;
}

.utm-module-panel-title {
    color: #fff;
    font-size: 1.063rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.utm-module-panel-title i {
    color: #2DD4BF;
}

.utm-module-panel-desc {
    color: #6B7280;
    font-size: 0.813rem;
}

.utm-module-group {
    margin-bottom: 1.5rem;
}

.utm-module-group:last-child {
    margin-bottom: 0;
}

.utm-module-group-title {
    color: #fff;
    font-size: 0.938rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.utm-module-group-title i {
    font-size: 0.875rem;
}

.utm-module-count {
    background: #252927;
    color: #9CA3AF;
    font-size: 0.688rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.utm-module-empty {
    color: #6B7280;
    font-size: 0.813rem;
    padding: 1rem 0;
}

.utm-module-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.utm-module-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 500;
    transition: transform 0.15s;
}

.utm-module-chip:hover {
    transform: translateY(-1px);
}

.utm-module-chip--assigned {
    border: 1px solid rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.06);
    color: #D1D5DB;
}

.utm-module-chip--available {
    border: 1px solid #2E2E2E;
    background: #1E2120;
    color: #9CA3AF;
}

.utm-module-chip-icon {
    font-size: 0.75rem;
    opacity: 0.6;
}

.utm-module-chip--assigned .utm-module-chip-icon {
    color: #22C55E;
    opacity: 0.8;
}

.utm-module-chip--available .utm-module-chip-icon {
    color: #6B7280;
}

.utm-module-toggle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.563rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
    margin-left: 0.25rem;
}

.utm-module-toggle--add {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
}

.utm-module-toggle--add:hover {
    background: rgba(34, 197, 94, 0.3);
    transform: scale(1.15);
}

.utm-module-toggle--remove {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.utm-module-toggle--remove:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.15);
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.utm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.813rem;
    border-radius: 0.5rem;
    transition: all 0.15s;
    font-family: inherit;
}

.utm-btn--primary {
    padding: 0.625rem 1rem;
    border: none;
    background: linear-gradient(135deg, #2DD4BF, #22C55E);
    color: #0F1412;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.2);
}

.utm-btn--primary:hover {
    box-shadow: 0 4px 16px rgba(45, 212, 191, 0.3);
    transform: translateY(-1px);
}

.utm-btn--back {
    padding: 0.5rem 0.875rem;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    color: #D1D5DB;
    font-size: 0.813rem;
    flex-shrink: 0;
}

.utm-btn--back:hover {
    background: #252927;
    border-color: #2DD4BF50;
}

.utm-btn--cancel {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.625rem;
    border: 1px solid #2E2E2E;
    font-weight: 600;
    font-size: 0.875rem;
    background: #1A1D1C;
    color: #D1D5DB;
}

.utm-btn--cancel:hover {
    background: #252927;
}

.utm-btn--danger {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.625rem;
    border: none;
    font-weight: 700;
    font-size: 0.875rem;
    background: #EF4444;
    color: #fff;
}

.utm-btn--danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ── Empty State ───────────────────────────────────────────────────── */
.utm-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.utm-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #4B5563;
    display: block;
}

.utm-empty-icon--large {
    font-size: 3rem;
    color: #6B7280;
}

.utm-empty-title {
    color: #fff;
    font-size: 1.063rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.utm-empty-desc {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Delete Confirmation Overlay ─────────────────────────────────── */
.utm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.utm-overlay-card {
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.875rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.utm-overlay-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: #EF4444;
}

.utm-overlay-title {
    color: #fff;
    font-size: 1.063rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.utm-overlay-desc {
    color: #9CA3AF;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.utm-overlay-actions {
    display: flex;
    gap: 0.75rem;
}

/* ── Modal Input Overrides ──────────────────────────────────────── */
.ut-inp {
    width: 100%;
    padding: 0.625rem 1rem;
    background: #1A1D1C;
    border: 1px solid #2E2E2E;
    border-radius: 0.625rem;
    color: #fff;
    font-size: 0.875rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ut-inp:focus {
    border-color: #2DD4BF;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.08);
}

.ut-cp {
    width: 48px;
    height: 36px;
    border: 1px solid #2E2E2E;
    border-radius: 0.5rem;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .utm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .utm-btn--primary {
        width: 100%;
        justify-content: center;
    }

    .utm-grid {
        grid-template-columns: 1fr;
    }

    .utm-detail-header {
        flex-wrap: wrap;
    }

    .utm-detail-id {
        display: none;
    }

    .utm-overlay-card {
        margin: 1rem;
    }
}