/* Satellite gear button */
.dc-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-600, #059642);
    border: none;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.dc-fab:hover {
    transform: rotate(30deg) scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.dc-fab svg {
    width: 17px;
    height: 17px;
}

.dc-badge-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    font-size: 0.62rem;
    font-weight: 700;
    background: var(--danger-500, #ef4444);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Slide-in drawer from right */
.dc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    cursor: pointer;
}

.dc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 95vw);
    background: var(--color-white, #fff);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.dark .dc-drawer {
    background: var(--gray-900, #111827);
}

/* Drawer header */
.dc-drawer-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
    flex-shrink: 0;
}

.dark .dc-drawer-hd {
    border-color: var(--gray-800, #1f2937);
}

.dc-drawer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900, #111827);
}

.dark .dc-drawer-title {
    color: #fff;
}

.dc-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--gray-100, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500, #6b7280);
    transition: background 0.15s;
}

.dc-close-btn:hover {
    background: var(--gray-200, #e5e7eb);
}

.dark .dc-close-btn {
    background: var(--gray-800, #1f2937);
    color: #d1d5db;
}

/* Drawer body */
.dc-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* KPI section */
.dc-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.dark .dc-section {
    border-color: var(--gray-800, #1f2937);
}

.dc-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.dc-kpi-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--gray-50, #f9fafb);
}

.dark .dc-kpi-row {
    background: var(--gray-800, #1f2937);
}

.dc-kpi-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-700, #374151);
}

.dark .dc-kpi-label {
    color: #d1d5db;
}

/* Toggle switch */
.dc-sw {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.dc-sw-track {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    transition: background 0.2s;
}

.dc-sw-thumb {
    position: absolute;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: left 0.2s;
}

/* Action row */
.dc-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.dc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.dc-btn:hover {
    opacity: 0.82;
}

.dc-btn-success {
    background: #dcfce7;
    color: #15803d;
}

.dc-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.dark .dc-btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.dark .dc-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Category */
.dc-cat-hd {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 14px 0 6px;
}

/* Widget card */
.dc-wcard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 5px;
}

.dc-wcard-on {
    background: #f0fdf4;
    border-color: #86efac;
}

.dc-wcard-off {
    background: var(--gray-50, #f9fafb);
    border-color: var(--gray-200, #e5e7eb);
    opacity: 0.65;
}

.dc-wcard:hover {
    opacity: 1 !important;
    box-shadow: 0 0 0 2px var(--primary-300, #a9dab9);
}

.dark .dc-wcard-on {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

.dark .dc-wcard-off {
    background: var(--gray-800, #1f2937);
    border-color: var(--gray-700, #374151);
}

.dc-wcard-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-700, #374151);
    flex: 1;
}

.dark .dc-wcard-name {
    color: #d1d5db;
}

/* Mini toggle */
.dc-mini-sw {
    position: relative;
    width: 28px;
    height: 16px;
    flex-shrink: 0;
}

.dc-mini-track {
    position: absolute;
    inset: 0;
    border-radius: 8px;
}

.dc-mini-dot {
    position: absolute;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Role badge */
.dc-role-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
}

.dc-role-student {
    background: #dbeafe;
    color: #1d4ed8;
}

.dc-role-teacher {
    background: #fef3c7;
    color: #92400e;
}

.dc-role-admin {
    background: #ede9fe;
    color: #6d28d9;
}

.dark .dc-role-student {
    background: rgba(11, 191, 85, 0.15);
    color: #b8f1c8;
}

.dark .dc-role-teacher {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.dark .dc-role-admin {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}
