/* user-management.html — page-specific styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

.dashboard { display: flex; min-height: 100vh; }

/* Sidebar (matches admin.html) */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo img { height: 40px; }
.header-buttons { margin-top: 16px; }
.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #8c99a8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}
.header-btn:hover {
    background: rgba(43,139,230,0.2);
    border-color: #2b8be6;
    color: #2b8be6;
}
.header-btn .material-icons { font-size: 18px; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    color: white;
    width: 100%;
    text-align: left;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item.active {
    background: #26303f;
    border-left: 4px solid #5468f2;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}
.nav-item .material-icons { margin-right: 12px; font-size: 20px; transition: all 0.3s ease; }
.nav-text { flex: 1; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
}
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.header p { color: #8c99a8; font-size: 16px; }
.content { padding: 32px; flex: 1; overflow-y: auto; }

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}
.card-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(43,139,230,0.1), rgba(84,104,242,0.1));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.card-title {
    font-size: 22px;
    font-weight: 700;
    color: #f2f5f9;
    display: flex;
    align-items: center;
}
.card-title .material-icons { margin-right: 12px; color: #2b8be6; font-size: 26px; }
.card-content { padding: 28px 32px; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border-left: 4px solid #10b981;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.stat-card.amber  { border-left-color: #f59e0b; }
.stat-card.purple { border-left-color: #5468f2; }
.stat-card.cyan   { border-left-color: #186dc2; }

.stat-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    box-shadow: 0 8px 25px rgba(43,139,230,0.3);
}
.stat-number { font-size: 32px; font-weight: 700; color: #f2f5f9; margin-bottom: 4px; }
.stat-label  { color: #8c99a8; font-size: 13px; font-weight: 500; }

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}
.tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #8c99a8;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}
.tab .material-icons { font-size: 18px; }
.tab:hover { color: #f2f5f9; }
.tab.active {
    color: #2b8be6;
    border-bottom-color: #2b8be6;
}
.tab-content { display: none; }

/* Search Bar */
.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.search-input {
    flex: 1;
    min-width: 240px;
    padding: 10px 16px 10px 44px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #f2f5f9;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: 14px center;
}
.search-input:focus {
    outline: none;
    border-color: #2b8be6;
    box-shadow: 0 0 0 4px rgba(43,139,230,0.1);
}

.filter-select {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #f2f5f9;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}
.filter-select:focus { outline: none; border-color: #2b8be6; }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.btn .material-icons { font-size: 18px; }
.btn-primary {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(43,139,230,0.4); }
.btn-secondary {
    background: rgba(11,14,19,0.8);
    color: #f2f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover { background: rgba(43,139,230,0.15); transform: translateY(-1px); }
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); }
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4); }
.btn-icon {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #8c99a8;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-icon:hover { background: rgba(43,139,230,0.15); color: #2b8be6; border-color: #2b8be6; }
.btn-icon.danger:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: #ef4444; }

/* Tables */
.table-wrap {
    background: rgba(11,14,19,0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.table th {
    background: rgba(43,139,230,0.1);
    font-weight: 600;
    color: #f2f5f9;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.table td { color: #c9d2dc; font-size: 14px; }
.table tr:hover { background: rgba(43,139,230,0.05); }

/* User row */
.user-cell { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(43,139,230,0.3);
    flex-shrink: 0;
}
.avatar.amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar.green  { background: linear-gradient(135deg, #10b981, #059669); }
.avatar.pink   { background: linear-gradient(135deg, #435af1, #0f28c7); }
.avatar.cyan   { background: linear-gradient(135deg, #186dc2, #145da6); }
.avatar.purple { background: linear-gradient(135deg, #5468f2, #1431ed); }

.user-meta-name { color: #f2f5f9; font-weight: 600; }
.user-meta-sub  { color: #8c99a8; font-size: 12px; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}
.badge-exec    { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
.badge-decision{ background: rgba(43,139,230,0.15); color: #5aa6ee; border-color: rgba(43,139,230,0.4); }
.badge-sme     { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }
.badge-pm      { background: rgba(84,104,242,0.15); color: #8c9bf7; border-color: rgba(84,104,242,0.4); }
.badge-active  { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
.badge-inactive{ background: rgba(154,164,177,0.15); color: #9aa4b1; border-color: rgba(154,164,177,0.4); }

/* Role Cards */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}
.role-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.3s ease;
    border-left: 4px solid #2b8be6;
    position: relative;
}
.role-card.executive { border-left-color: #f59e0b; }
.role-card.decision  { border-left-color: #2b8be6; }
.role-card.sme       { border-left-color: #10b981; }
.role-card.pm        { border-left-color: #5468f2; }
.role-card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.25); }

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
}
.role-title {
    font-size: 17px;
    font-weight: 700;
    color: #f2f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}
.role-title .material-icons { font-size: 22px; }
.role-card.executive .role-title .material-icons { color: #f59e0b; }
.role-card.decision  .role-title .material-icons { color: #2b8be6; }
.role-card.sme       .role-title .material-icons { color: #10b981; }
.role-card.pm        .role-title .material-icons { color: #5468f2; }

.role-count {
    font-size: 12px;
    color: #8c99a8;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 12px;
}
.role-summary {
    color: #c9d2dc;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.55;
}
.role-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #838f9f;
    font-weight: 700;
    margin-bottom: 6px;
    margin-top: 12px;
}
.role-list {
    list-style: none;
    padding: 0;
}
.role-list li {
    font-size: 13px;
    color: #c9d2dc;
    padding: 4px 0 4px 18px;
    position: relative;
    line-height: 1.5;
}
.role-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #2b8be6;
    font-weight: 700;
}
.role-card.executive .role-list li::before { color: #f59e0b; }
.role-card.sme       .role-list li::before { color: #10b981; }
.role-card.pm        .role-list li::before { color: #5468f2; }

.role-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Permissions matrix */
.permissions-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}
.permissions-table th, .permissions-table td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}
.permissions-table th {
    background: rgba(43,139,230,0.1);
    color: #f2f5f9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px;
}
.permissions-table td.resource {
    text-align: left;
    color: #f2f5f9;
    font-weight: 500;
}
.permissions-table td.resource .resource-sub {
    display: block;
    font-size: 11px;
    color: #8c99a8;
    font-weight: 400;
    margin-top: 2px;
}
.permissions-table tbody tr:hover { background: rgba(43,139,230,0.04); }

/* CRUD checkbox toggle */
.crud-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.crud-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.crud-checkbox:hover { border-color: #2b8be6; }
.crud-checkbox:checked {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
}
.crud-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid rgba(201,209,220,.14);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.crud-checkbox.read:checked     { background: linear-gradient(135deg, #186dc2, #145da6); border-color: #186dc2; }
.crud-checkbox.create:checked   { background: linear-gradient(135deg, #10b981, #059669); border-color: #10b981; }
.crud-checkbox.update:checked   { background: linear-gradient(135deg, #f59e0b, #d97706); border-color: #f59e0b; }
.crud-checkbox.delete:checked   { background: linear-gradient(135deg, #ef4444, #dc2626); border-color: #ef4444; }

.crud-legend {
    display: flex;
    gap: 18px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #8c99a8;
}
.crud-legend .swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}
.swatch.create { background: linear-gradient(135deg, #10b981, #059669); }
.swatch.read   { background: linear-gradient(135deg, #186dc2, #145da6); }
.swatch.update { background: linear-gradient(135deg, #f59e0b, #d97706); }
.swatch.delete { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: rgba(22,29,38,0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: #f2f5f9;
}
.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-header h2 .material-icons { color: #2b8be6; }
.modal-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8c99a8;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: #ef4444; }
.modal-body { padding: 24px 28px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 18px 28px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #f2f5f9;
    font-size: 13px;
}
.form-group .hint { color: #838f9f; font-size: 11px; margin-top: 4px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 14px;
    color: #f2f5f9;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2b8be6;
    box-shadow: 0 0 0 4px rgba(43,139,230,0.1);
    background: rgba(0, 0, 0, 0.4);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #838f9f; }

.section-divider {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #838f9f;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 6px;
    margin: 18px 0 14px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.check-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: #c9d2dc;
}
.check-item input[type="checkbox"] {
    accent-color: #2b8be6;
    width: 16px; height: 16px;
}

.reset-password-link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 0 12px;
    background: rgba(140,155,247,0.10);
    border: 1px solid rgba(140,155,247,0.40);
    border-radius: 8px;
    color: #b8c1fa;
    font-family: inherit; font-size: 12px; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.reset-password-link:hover {
    background: rgba(140,155,247,0.20);
    border-color: rgba(140,155,247,0.65);
    color: #d8ddfc;
    transform: translateY(-1px);
}
.reset-password-link .material-icons { color: #b8c1fa; }

.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: rgba(22,29,38,0.97);
    color: #f2f5f9;
    padding: 14px 22px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .material-icons { color: #10b981; }

/* Scope modal — workspace card picker */
.scope-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    max-height: 56vh;
    overflow-y: auto;
    padding: 4px 4px 12px;
}
.scope-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.scope-card:hover {
    border-color: rgba(43,139,230,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.scope-card.selected {
    border-color: #2b8be6;
    background: rgba(43,139,230,0.08);
    box-shadow: 0 0 0 1px rgba(43,139,230,0.4) inset;
}
.scope-card .scope-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.scope-card .scope-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(43,139,230,0.25);
    flex-shrink: 0;
}
.scope-card .scope-card-icon .material-icons { font-size: 20px; }
.scope-card .scope-card-title {
    font-weight: 600;
    color: #f2f5f9;
    font-size: 13.5px;
    line-height: 1.25;
}
.scope-card .scope-card-cat {
    font-size: 11px;
    color: #838f9f;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}
.scope-card .scope-card-desc {
    font-size: 12px;
    color: #8c99a8;
    line-height: 1.45;
    min-height: 32px;
}
.scope-card .scope-crud {
    display: flex;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 8px;
    margin-top: 4px;
    justify-content: space-between;
}
.scope-card .scope-crud-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 6px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(0,0,0,0.25);
    color: #8c99a8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    user-select: none;
}
.scope-card.selected .scope-crud-btn { color: #c9d2dc; }
.scope-card .scope-crud-btn:hover { border-color: rgba(255,255,255,0.3); }
.scope-card .scope-crud-btn.on.create { background: rgba(16,185,129,0.18); color:#34d399; border-color: rgba(16,185,129,0.5); }
.scope-card .scope-crud-btn.on.read   { background: rgba(24,109,194,0.18);  color:#2b88e5; border-color: rgba(24,109,194,0.5); }
.scope-card .scope-crud-btn.on.update { background: rgba(245,158,11,0.18); color:#fbbf24; border-color: rgba(245,158,11,0.5); }
.scope-card .scope-crud-btn.on.delete { background: rgba(239,68,68,0.18);  color:#f87171; border-color: rgba(239,68,68,0.5); }
.scope-card.disabled-crud .scope-crud { opacity: 0.4; pointer-events: none; }
.scope-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(0,0,0,0.45);
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.scope-card.selected .scope-check {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-color: #2b8be6;
}
.scope-card .scope-check .material-icons {
    font-size: 16px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.scope-card.selected .scope-check .material-icons { opacity: 1; }
.scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(43,139,230,0.12);
    color: #5aa6ee;
    border: 1px solid rgba(43,139,230,0.3);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
}
.scope-pill .crud-tags { display:inline-flex; gap:3px; margin-left:4px; }
.scope-pill .crud-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
}
.scope-pill .crud-tag.c { background: rgba(16,185,129,0.25); color:#34d399; }
.scope-pill .crud-tag.r { background: rgba(24,109,194,0.25);  color:#2b88e5; }
.scope-pill .crud-tag.u { background: rgba(245,158,11,0.25); color:#fbbf24; }
.scope-pill .crud-tag.d { background: rgba(239,68,68,0.25);  color:#f87171; }

@media (max-width: 900px) {
    .form-row, .form-row.three { grid-template-columns: 1fr; }
    .sidebar { width: 240px; }
    .main-content { margin-left: 240px; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); z-index: 1100; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
