* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans Arabic', 'Inter', 'Segoe UI', sans-serif;
}
body {
    /* min-height: 100vh; */
    /* background: #f4f7fb; */
    background-size: cover;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar-track
{
	-webkit-box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	background-color: none;
  backdrop-filter: blur(15px);
}

::-webkit-scrollbar
{
	width: 6px;
	background-color: none;
  backdrop-filter: blur(15px);
}

::-webkit-scrollbar-thumb
{
	border-radius: 10px;
	-webkit-box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3);
	background-color: none;
  backdrop-filter: blur(15px);
}

.device-checkbox[disabled] {
  cursor: not-allowed;
}

.containers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    align-content: stretch;
    gap: 1.25rem;
    width: 100%;
    height: calc(100vh - 3rem);
    height: calc(100dvh - 3rem);
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.alert {
    color: rgb(255, 82, 82);
}
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -990;
    overflow: hidden;
}
.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: moveSphere 20s infinite ease-in-out;
}
.sphere-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(45deg, #ff3366, #ff6b3d);
    top: -300px;
    left: -300px;
    animation-delay: -5s;
}
.sphere-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(45deg, #4433ff, #3dceff);
    bottom: -250px;
    right: -250px;
    animation-delay: -2s;
}
.sphere-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, #7400ff, #ff00d4);
    top: 50%;
    left: 30%;
    animation-delay: -8s;
}
@keyframes moveSphere {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(100px, 50px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translate(50px, 100px) rotate(180deg) scale(1);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg) scale(0.9);
    }
}
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: floatParticle 8s infinite linear;
}
@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}
/* .login-container {
    z-index: 2;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    color: black;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
    
  position: absolute;
  top: 20%;
  left: 35%;
  transform: translate(-50%, -50%);
} */
/* .login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: skewX(-15deg);
    transition: 0.5s;
}
.login-container:hover::before {
    left: 100%;
} */


.media-header {
    position: relative;
    /* backdrop-filter: blur(20px); */
    height: 7vh;
    margin-top: 2%;

    display: flex;
    align-items: center;
    justify-content: space-around;
}


.Header {
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    height: 7vh;
    margin-bottom: 1%;
    z-index: 1000;
    color: white;

    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0px 5%;
}

.logo {
    width: 8%;
}

.ml {
    margin-left: 2%;
}

.account {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.164);
}


.account img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.media-container,
.playlist-container,
.devices-container {
    position: relative;
    z-index: 2;
    flex: 1 1 320px;
    min-width: 280px;
    max-width: 32%;
    height: 100%;
    margin: 0;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 0;
    color: #fff;
    box-shadow:
        0 25px 60px -20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.media-container::after,
.playlist-container::after,
.devices-container::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    pointer-events: none;
}

.media-container::before,
.playlist-container::before,
.devices-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(159, 134, 255, 0.18), transparent 35%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.media-container:hover,
.playlist-container:hover,
.devices-container:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 30px 70px -18px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.media-container:hover::before,
.playlist-container:hover::before,
.devices-container:hover::before {
    opacity: 1;
}

@media (max-width: 1024px) {
    .media-container,
    .playlist-container,
    .devices-container {
        max-width: 48%;
    }
}
@media (max-width: 768px) {
    .containers {
        height: auto;
        min-height: calc(100dvh - 5rem);
        padding: 0.5rem 0;
    }
    .media-container,
    .playlist-container,
    .devices-container {
        max-width: 100%;
        flex-basis: 100%;
        height: auto;
        min-height: 60vh;
    }
}

/* .playlist-container & .devices-container styled with .media-container above */




@keyframes slideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.login-header {
    text-align: center;
    margin-bottom: 0.25rem;
}
.login-header h1 {
    font-size: clamp(1.5rem, 3.4vw, 1.95rem);
    font-weight: 600;
    margin-bottom: 0.3rem;
    background: linear-gradient(270deg, #ffffff, #d6caff 50%, #9d8ce0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}
.login-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.82rem, 2vw, 0.9rem);
    margin: 0;
}
.form-group {
    position: relative;
    margin-bottom: 0.75rem;
}
.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.4rem;
    padding-left: 0.15rem;
}
.login-field {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 10, 30, 0.45);
    border: none;
    outline: none;
    border-radius: 12px;
    transition: background 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.login-field:hover {
    background: rgba(15, 10, 30, 0.55);
}
.login-field:focus-within {
    background: rgba(15, 10, 30, 0.65);
}
.form-input {
    flex: 1;
    width: 100%;
    height: 48px;
    padding: 0 0.9rem 0 2.6rem;
    margin: 0;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 12px;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    font-size: 0.98rem;
    font-weight: 400;
    color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none !important;
}
.form-input:hover,
.form-input:focus,
.form-input:active {
    background: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    outline: none !important;
}
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.32);
    font-size: 0.88rem;
    font-weight: 400;
}
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 99999s ease-in-out 0s, color 99999s ease-in-out 0s, box-shadow 99999s ease-in-out 0s;
}
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease;
    pointer-events: none;
    font-size: 0.9rem;
    z-index: 1;
}
.login-field:focus-within .input-icon {
    color: #c9bbff;
}
.password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
    z-index: 1;
}
.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}
.submit-button {
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    margin-top: 0.7rem;
    background: linear-gradient(135deg, #8b6dff 0%, #6452a3 50%, #4a3a82 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.25s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow:
        0 8px 24px -8px rgba(124, 92, 220, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.submit-button i {
    transition: transform 0.25s ease;
}
.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transition: left 0.6s ease;
}
.submit-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow:
        0 14px 32px -8px rgba(124, 92, 220, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.submit-button:hover i {
    transform: translateX(3px);
}
.submit-button:hover::before {
    left: 100%;
}
.submit-button:active {
    transform: translateY(0);
}
.social-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}
.social-button {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(80, 80, 80, 0.05);
    color: black;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.social-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(58, 58, 58, 0.1);
    transform: translateY(100%);
    transition: 0.3s ease;
}
.social-button:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}
.social-button:hover::before {
    transform: translateY(0);
}
.login-footer {
    text-align: center;
    padding: 1.4rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.login-footer__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.login-footer__hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}
.error-message {
    color: #ff8aa7;
    font-size: 0.82rem;
    margin-top: 0.4rem;
    display: none;
    animation: fadeIn 0.3s ease;
}
.error-message:not(:empty) {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}




/* .media-list {
    padding: 1rem;
} */

.btnU {
    padding: 0.5rem;
    background: none;
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgb(143, 143, 143);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btnU::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(196, 196, 196, 0.8),
        transparent
    );
    transition: 0.5s;
}
.btnU:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.btnU:hover::before {
    left: 100%;
}




.media-library, .playlist-container, .devices-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.media-library > .media-header:first-child,
.playlist-container > .media-header:first-child,
.devices-container > .media-header:first-child {
  flex: 0 0 auto;
}
.media-library > .media-header:last-child,
.playlist-container > .media-header:last-child,
.devices-container > .media-header:last-child {
  flex: 0 0 auto;
  margin-top: auto;
}

.custom-header-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.media-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: #f5f5f5;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: grab;
}

.media-item img {
  width: 106px;
  height: 60px;
  border-radius: 6px;
  object-fit: contain;
  margin-right: 15px;
  background-color: black;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 10px 15px;
  background: rgba(20, 14, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  margin-bottom: 12px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    0 6px 14px -8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.device-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(25, 18, 50, 0.65);
}
.device-item .edit-menu-btn,
.device-item .circle-checkbox {
  align-self: center;
  margin: 0;
  flex-shrink: 0;
}
.device-item .circle-checkbox { margin-right: 0; }

.media-info {
  flex: 1;
}

.meta {
  font-size: 0.85rem;
  color: #cfcfcf;
}

/* === Glass icon buttons (edit / info / watch / power / update) ===
   Shared base, with subtle accent tint per action. */
.edit-menu-btn,
.edit-btn,
.info-btn,
.watch-btn,
.power-btn,
.update-btn,
.full-edit-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  margin: 0 2px;
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, color 0.18s ease;
}
.edit-menu-btn:hover,
.edit-btn:hover,
.info-btn:hover,
.watch-btn:hover,
.power-btn:hover,
.update-btn:hover,
.full-edit-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.edit-menu-btn { color: #c9bbff; }
.edit-menu-btn:hover { background: rgba(139, 109, 255, 0.22); border-color: rgba(159, 134, 255, 0.45); }
.edit-btn       { color: #c9bbff; }
.edit-btn:hover { background: rgba(139, 109, 255, 0.18); border-color: rgba(159, 134, 255, 0.40); }
.full-edit-btn {
  /* overrides Bootstrap .btn + .btn-outline-secondary on library cards */
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  color: #c9bbff !important;
  background: rgba(139, 109, 255, 0.12) !important;
  border: 1px solid rgba(159, 134, 255, 0.25) !important;
  border-radius: 10px !important;
  min-width: 34px !important;
}
.full-edit-btn:hover {
  background: rgba(139, 109, 255, 0.22) !important;
  border-color: rgba(159, 134, 255, 0.45) !important;
  color: #fff !important;
}
.info-btn       { color: #ffcb6b; }
.info-btn:hover { background: rgba(255, 196, 84, 0.18); border-color: rgba(255, 196, 84, 0.40); }
.watch-btn      { color: #92b4ff; }
.watch-btn:hover{ background: rgba(124, 156, 255, 0.18); border-color: rgba(124, 156, 255, 0.40); }


.swal2-input.swal-input-custom {
  margin: 4px 0 !important;     /* Reduce margin */
}




/* Toggle Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #4caf50;
}
input:checked + .slider:before {
  transform: translateX(18px);
}






/* .power-btn picks up the shared glass icon-button style above */
.power-on  { color: #6ee7a4 !important; }
.power-on:hover  { background: rgba(86, 195, 130, 0.2) !important; border-color: rgba(86, 195, 130, 0.40) !important; }
.power-off { color: #ff8aa7 !important; }
.power-off:hover { background: rgba(255, 95, 122, 0.2) !important; border-color: rgba(255, 95, 122, 0.40) !important; }
.update-btn { color: #92b4ff; }
.update-btn:hover { background: rgba(124, 156, 255, 0.20) !important; border-color: rgba(124, 156, 255, 0.40) !important; }



















    .playlists-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .playlist {
        background: rgba(0,0,0,0.1);
        border-radius: 8px;
        overflow: hidden;
    }
    
    .playlist-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        background-color: rgba(0,0,0,0.2);
        cursor: pointer;
        transition: 0.5s all;
    }
    
    .playlist-header:hover {
        background-color: rgba(0,0,0,0.25);
    }
    
    .playlist-content {
        display: none;
        padding: 10px;
    }
    
    .playlist-content.active {
        display: block;
    }
    
    .media-item {
        cursor: move;
        transition: transform 0.2s;
        background: rgba(255,255,255,0.05);
        margin-bottom: 8px;
        border-radius: 4px;
        padding: 8px;
    }
    
    .media-item.dragging {
        opacity: 0.5;
        transform: scale(0.95);
    }
    
    .playlist-content.drop-zone {
        background: rgba(139, 109, 255, 0.12);
        border: 2px dashed rgba(159, 134, 255, 0.55);
    }
    
    .playlist-actions {
        display: flex;
        gap: 10px;
    }
    
    .playlist-actions button {
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        font-size: 14px;
        opacity: 0.7;
        transition: opacity 0.2s;
    }
    
    .playlist-actions button:hover {
        opacity: 1;
    }
    
    .new-playlist-form {
        display: none;
        padding: 15px;
        background: rgba(0,0,0,0.2);
        border-radius: 8px;
        margin-bottom: 15px;
    }
    
    .new-playlist-form.active {
        display: block;
    }
    
    .new-playlist-form input {
        width: 100%;
        padding: 8px 12px;
        margin-bottom: 10px;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        color: white;
        border-radius: 4px;
    }
    
    .form-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    .media-list.drop-zone {
        background: rgba(139, 109, 255, 0.12);
        border: 2px dashed rgba(159, 134, 255, 0.55);
        border-radius: 10px;
    }


    .draggable-mirror {
        opacity: 0.5;
        transform: scale(0.95);
        z-index: 1000;
    }



    .media-playlist.drop-zone {
        background: rgba(139, 109, 255, 0.10);
        border: 2px dashed rgba(159, 134, 255, 0.50);
        border-radius: 10px;
        transition: 0.2s ease;
    }

    .media-item.placeholder {
        background-color: rgba(0, 255, 0, 0.2);
        border: 2px dashed rgba(0, 255, 0, 0.5);
        font-style: italic;
        text-align: center;
        color: #333;
    }





.title {
  color: #e5e0e8;
  padding: 0;
  margin: 0;
  font-weight: 400;
}

p {
  color: #1e1028;
}

.draggable-container {
  background-color: #1e1028;
  padding: 3rem;
  margin: 1rem 0;
  width: 70%;
  border-radius: 5px;
  box-shadow: 10px 15px 20px #1e192844;
}

.shallow-draggable, .playlist-item {
  background-color: rgb(241 237 243 / 13%);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 5px;
  transition: opacity 200ms ease;
}

.dragging {
  opacity: 0.5;
  transition: opacity 1s ease;
}


.drop-zone-highlight,
.playlist-content.drop-zone,
.media-list.drop-zone,
.media-playlist.drop-zone {
  background: rgba(139, 109, 255, 0.12) !important;
  border: 2px dashed rgba(159, 134, 255, 0.55) !important;
  border-radius: 12px !important;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 0 40px rgba(139, 109, 255, 0.10);
}

/* Playlist row being dropped onto (drag.js adds .drag-hover) */
.dragTo.drag-hover {
  background: rgba(139, 109, 255, 0.14) !important;
  border: 1px solid rgba(159, 134, 255, 0.55) !important;
  border-radius: 12px !important;
  box-shadow:
    0 0 0 3px rgba(139, 109, 255, 0.18),
    0 10px 28px -10px rgba(124, 92, 220, 0.55),
    inset 0 0 40px rgba(139, 109, 255, 0.12) !important;
  transform: translateY(-1px);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.dragTo.drag-hover .playlist-header {
  background: linear-gradient(90deg, rgba(139, 109, 255, 0.32), transparent) !important;
  color: #fff;
}
.dragTo.drag-hover .playlist-header::before {
  content: "\f063"; /* fa-caret-down */
  font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif;
  font-weight: 900;
  color: #c9bbff;
  margin-right: 0.6rem;
  animation: dragHoverBounce 1s ease-in-out infinite;
}
@keyframes dragHoverBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.drag-over,
.drag-hover {
  background: rgba(139, 109, 255, 0.12) !important;
  outline: 2px dashed rgba(159, 134, 255, 0.55);
  outline-offset: -2px;
  border-radius: 10px;
}

/* Drag ghost */
.draggable-mirror,
.media-item.dragging,
.draggable-source--is-dragging {
    opacity: 0.85 !important;
    transform: scale(0.96) rotate(-1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(159, 134, 255, 0.45);
    border-radius: 10px;
}

/* Insertion indicator — a glassy purple rectangle so you can SEE where the
   item is going to land. drag.js writes inline styles, so we use !important. */
.placeholder,
p.placeholder,
.dropPlaceholder,
.drop-placeholder {
    display: block !important;
    min-height: 48px !important;
    margin: 6px 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.22), rgba(100, 82, 163, 0.12)) !important;
    border: 2px dashed rgba(201, 187, 255, 0.55) !important;
    border-radius: 10px !important;
    box-shadow:
        0 0 0 1px rgba(159, 134, 255, 0.18),
        0 8px 22px -10px rgba(124, 92, 220, 0.55),
        inset 0 0 20px rgba(159, 134, 255, 0.12) !important;
    list-style: none !important;
    position: relative;
    overflow: hidden;
    animation: dropPulse 1.4s ease-in-out infinite;
}
.placeholder::before,
.dropPlaceholder::before {
    content: "\f063"; /* fa-caret-down */
    font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif;
    font-weight: 900;
    color: #c9bbff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.95rem;
    opacity: 0.9;
}
@keyframes dropPulse {
    0%, 100% { box-shadow:
        0 0 0 1px rgba(159, 134, 255, 0.18),
        0 8px 22px -10px rgba(124, 92, 220, 0.45),
        inset 0 0 20px rgba(159, 134, 255, 0.08); }
    50%      { box-shadow:
        0 0 0 1px rgba(159, 134, 255, 0.35),
        0 10px 28px -10px rgba(124, 92, 220, 0.65),
        inset 0 0 30px rgba(159, 134, 255, 0.18); }
}















/* .shallow-draggable.dragging {
  opacity: 0.5;
}

.draggable-container {
  min-height: 100px;
  border: 2px dashed #ccc;
  padding: 10px;
  margin: 10px 0;
}

.draggable-container h1 {
  margin-top: 0;
} */











.edit-btn, .edit-btn * {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.play-list {
    padding: 1rem;
}








.dragTo {
  /* border: 2px solid #eee; */
  margin-bottom: 15px;
  border-radius: 8px;
  /* background: #fafbfc; */
  transition: box-shadow .2s;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}
.dragTo:not(.collapsed) { box-shadow: 0 3px 12px rgba(255, 255, 255, 0.1);}
.dragTo .playlist-header {
  cursor: pointer;
  background: #efefef;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 1.12em;
  /* border-bottom: 1px solid #e0e6ed; */
  user-select: none;
  min-height: 52px;
}
.dragTo .playlist-header > * { align-self: center; }
.dragTo .playlist-title { flex: 1; min-width: 0; line-height: 1.2; }
.dragTo .toggle-btn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.dragTo .playlist-header:hover .toggle-btn,
.dragTo .toggle-btn:hover {
  background: rgba(139, 109, 255, 0.18);
  border-color: rgba(159, 134, 255, 0.45);
  color: #fff;
}
.dragTo.collapsed .toggle-btn { transform: rotate(0deg); }
.dragTo:not(.collapsed) .toggle-btn {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #8b6dff, #6452a3);
  border-color: rgba(159, 134, 255, 0.55);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(124, 92, 220, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.dragTo .playlist-content {
  display: block;
  padding: 16px;
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.28s ease,
              opacity 0.2s ease,
              margin 0.28s ease;
}
.dragTo.collapsed .playlist-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  /* Fully gone after the animation */
}
.dragTo .playlist-content .playlist-item {
  margin-bottom: 10px;
}











.play-list, .media-list, .device-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}
.play-list::-webkit-scrollbar,
.media-list::-webkit-scrollbar,
.device-list::-webkit-scrollbar { width: 6px; }
.play-list::-webkit-scrollbar-thumb,
.media-list::-webkit-scrollbar-thumb,
.device-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}






#custom-context-menu li.ctx-action:hover {
  background: #f4f8fa;
}











.pulse-circle {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-block;
  margin-right: 15px;
}

.pulse-core-off {
  position: absolute;
  width: 40px;
  height: 40px;
  background: #e53935;
  border-radius: 50%;
  left: 0;
  top: 0;
  z-index: 2;
  box-shadow: 0 0 12px #e5393588;
}

.pulse-ring-off {
  position: absolute;
  left: 0; top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(229, 57, 53, 0.45);
  z-index: 1;
  animation: pulse-anim 1.4s cubic-bezier(0.5,0,0.5,1) infinite;
}

.pulse-core-sleep {
  position: absolute;
  width: 40px;
  height: 40px;
  background: #a7a7a7;
  border-radius: 50%;
  left: 0;
  top: 0;
  z-index: 2;
  box-shadow: 0 0 12px #90909088;
}

.pulse-ring-sleep {
  position: absolute;
  left: 0; top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(159, 159, 159, 0.45);
  z-index: 1;
  animation: pulse-anim 1.4s cubic-bezier(0.5,0,0.5,1) infinite;
}

.pulse-core-on {
  position: absolute;
  width: 40px;
  height: 40px;
  background: #35e535;
  border-radius: 50%;
  left: 0;
  top: 0;
  z-index: 2;
  box-shadow: 0 0 12px #49e53588;
}

.pulse-ring-on {
  position: absolute;
  left: 0; top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(53, 229, 82, 0.45);
  z-index: 1;
  animation: pulse-anim 1.4s cubic-bezier(0.5,0,0.5,1) infinite;
}

.pulse-core-new {
  position: absolute;
  width: 40px;
  height: 40px;
  background: #7835e5;
  border-radius: 50%;
  left: 0;
  top: 0;
  z-index: 2;
  box-shadow: 0 0 12px #8735e588;
}

.pulse-ring-new {
  position: absolute;
  left: 0; top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(120, 53, 229, 0.45);
  z-index: 1;
  animation: pulse-anim 1.4s cubic-bezier(0.5,0,0.5,1) infinite;
}

.pulse-core-error {
  position: absolute;
  width: 40px;
  height: 40px;
  background: #e5d335;
  border-radius: 50%;
  left: 0;
  top: 0;
  z-index: 2;
  box-shadow: 0 0 12px #e5d93588;
}

.pulse-ring-error {
  position: absolute;
  left: 0; top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(229, 226, 53, 0.45);
  z-index: 1;
  animation: pulse-anim 1.4s cubic-bezier(0.5,0,0.5,1) infinite;
}

@keyframes pulse-anim {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}




















.circle-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin-right: 12px;
}

.circle-checkbox input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.circle-checkbox .checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
  position: relative;
}
.circle-checkbox:hover .checkmark {
  border-color: rgba(159, 134, 255, 0.45);
  background: rgba(139, 109, 255, 0.12);
  color: rgba(201, 187, 255, 0.9);
  transform: translateY(-1px);
}

.circle-checkbox input[type="checkbox"]:checked + .checkmark {
  border-color: rgba(159, 134, 255, 0.6);
  background: linear-gradient(135deg, #8b6dff, #6452a3);
  color: #fff;
  box-shadow:
    0 8px 18px -8px rgba(124, 92, 220, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.circle-checkbox .checkmark::before {
  content: "\f00c"; /* fa-check */
  font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.17s ease;
}
.circle-checkbox input[type="checkbox"]:checked + .checkmark::before {
  opacity: 1;
  transform: scale(1);
}
.circle-checkbox .checkmark::after { content: none; }


.dropdown-toggle {
  cursor: pointer;
}

.dropdown-toggle::after {
  margin-right: .255em;
}

.dropdown-item .fas {
  margin-right: 8%;
}

.dropdown-item {
  color: white;
}

.dropdown-item-dummy {
  display: block;
  width: 100%;
  padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
  clear: both;
  font-weight: 400;
  color: white;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  border-radius: var(--bs-dropdown-item-border-radius, 0);
}















.circle-choice {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  margin: 0 12px 0 0;
  flex-shrink: 0;
  line-height: 1;
}

.circle-choice input[type="radio"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.circle-choice .checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
  position: relative;
  color: rgba(255, 255, 255, 0.5);
}
.circle-choice:hover .checkmark {
  border-color: rgba(159, 134, 255, 0.45);
  background: rgba(139, 109, 255, 0.12);
  color: rgba(201, 187, 255, 0.9);
  transform: translateY(-1px);
}

.circle-choice input[type="radio"]:checked + .checkmark {
  border-color: rgba(159, 134, 255, 0.6);
  background: linear-gradient(135deg, #8b6dff, #6452a3);
  color: #fff;
  box-shadow:
    0 8px 18px -8px rgba(124, 92, 220, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Pick-list check icon (Font Awesome) */
.circle-choice .checkmark::before {
  content: "\f00c"; /* fa-check */
  font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.17s ease;
}
.circle-choice input[type="radio"]:checked + .checkmark::before {
  opacity: 1;
  transform: scale(1);
}













.account-container {
    display: flex;
    align-items: center;
}

.account-name {
    margin-right: 15px;
}

.account-name::after {
    color: black;
}





.media-title {
    display: block;
    max-width: 14vw; /* Adjust to fit your layout */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-header:hover {
  filter: brightness(1.05);
  transition: 0.5s all;
}








/* Modal overlay */
.edit-menu-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 20, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.edit-menu-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.edit-menu-content {
  width: 100%;
  max-width: 460px;
  padding: clamp(1.4rem, 3vw, 1.8rem);
  border-radius: 18px;
  background: rgba(20, 14, 40, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  color: #fff;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(8px) scale(0.97);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.edit-menu-modal.show .edit-menu-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.edit-menu-content h5 {
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
}

.edit-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.edit-btn-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem 0.5rem;
  height: 96px;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.edit-btn-tile:hover {
  transform: translateY(-3px);
  background: rgba(139, 109, 255, 0.12);
  border-color: rgba(159, 134, 255, 0.40);
  color: #fff;
}
.edit-btn-tile i {
  font-size: 1.35rem;
  color: #c9bbff;
  transition: color 0.2s ease, transform 0.2s ease;
}
.edit-btn-tile:hover i { transform: scale(1.06); }

/* Tinted icons per action — gives at-a-glance recognition without
   bringing back the candy palette on the background */
.edit-btn-tile.bg-yellow i { color: #ffcb6b; }
.edit-btn-tile.bg-purple i { color: #c9bbff; }
.edit-btn-tile.bg-orange i { color: #ffb38a; }
.edit-btn-tile.bg-green  i { color: #6ee7a4; }
.edit-btn-tile.bg-red    i { color: #ff8aa7; }
.edit-btn-tile.bg-blue   i { color: #92b4ff; }
.edit-btn-tile.bg-yellow,
.edit-btn-tile.bg-purple,
.edit-btn-tile.bg-orange,
.edit-btn-tile.bg-green,
.edit-btn-tile.bg-red,
.edit-btn-tile.bg-blue {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
}

.edit-menu-modal:has(.edit-menu-content):not(.show) {
  pointer-events: none;
}

.edit-menu-close-container {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}
.edit-menu-close-btn {
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.edit-menu-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}







.but {
  color: rgb(255, 255, 255);
  transition: all 0.1s ease-in-out;
}

.but.active {
  color: #6452a3;
}

.but:hover {
  color: #6452a3;
}







.overlay {
  background-color: rgba(128, 128, 128, 0.5);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#upload-trigger:hover .overlay {
  opacity: 1;
}





.settings-widget-icon {
  color: #6452a3;
  text-shadow: 0px 0px 70px #6452a3;
}






/* Example for a custom class .no-decoration */
a.no-decoration {
  text-decoration: none !important;
}
/* Optional: keep no underline even on hover/focus */
a.no-decoration:hover,
a.no-decoration:focus {
  text-decoration: none !important;
}









    .bg-pic {
      height: 200px;
      background-color: #e9ecef;
      background-size: cover;
      background-position: center;
    }
    .profile-info {
      background: linear-gradient(0deg, #ffffff2e, #ffffff00);
      margin-top: -100px;
      text-align: center;
    }
    .profile-pic {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      border: 3px solid white;
      object-fit: contain;
      background-color: #f5f5f5;
    }
    .section {
      padding: 20px;
      height: 100%;
    }
    .users-status-pic {
      border: 0.5px solid rgb(221, 221, 221);
      object-fit: contain;
    }
    .list-overflow {
      overflow-y: scroll;
      height: 85%;
    }
    .online-system {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
    }
    .account-system {
      /* background-color: white;
      border: 3px solid #eff2f5; */
      
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      color: white;
    }
    .account-system input {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      border: none;
      color: rgb(226, 226, 226);
    }
    #contentForm input {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      border: none;
      color: rgb(226, 226, 226);
    }
    /* .account-system .form-label {
      color: rgb(226, 226, 226);
    } */
    .modal-body input {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      border: none;
      color: rgb(226, 226, 226);
    }
    .form-container input {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      border: none;
      color: rgb(226, 226, 226);
    }
    .account-system input:disabled {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      border: none;
      color: rgb(226, 226, 226);
    }
    .account-system select {
  background: rgba(255, 255, 255, 0.1) 
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e2e2e2' class='bi bi-caret-down-fill' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.658l-4.796 5.482a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") 
              no-repeat right 0.75rem center / 1rem auto;
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
      border: none;
      color: rgb(226, 226, 226);
    }

    .account-system select option {
      background-color: #222; /* default background for options */
      color: #e2e2e2; /* text color */
    }






.btn-close {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}






    
  /* .form-control + label styling consolidated in the GLOBAL DARK GLASS INPUTS block */
  label {
    font-weight: 500;
    margin-bottom: 6px;
  }

  .form-check-label {
    font-weight: 500;
    color: #b1b1b1;
  }
  
/* Optional: if you want a smoother instant effect */
.form-check-input {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

  .form-check-input:checked {
  background-color: #667eea !important; /* Your desired color */
  border-color: #667eea !important;
  box-shadow: none !important;
  }

/* Also keep it styled when focused & checked */
.form-check-input:checked:focus {
  background-color: #667eea !important;
  border-color: #667eea !important;
}

  .abilities-group {
    margin-bottom: 20px;
    padding: 20px;
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
    border: none !important;
    border-radius: 10px;
  }

  .abilities-group strong {
    font-size: 1rem;
    color: #e7e7e7 !important;
  }

  .abilities-group .form-check {
    margin-bottom: 10px;
  }













/* Defs */
@property --angle-1 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -75deg;
}

@property --angle-2 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -45deg;
}

:root {
  --global--size: clamp(2rem, 4vw, 5rem);
  --anim--hover-time: 400ms;
  --anim--hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
}






/* Button Wrap Container */
.button-wrap {
  position: relative;
  z-index: 2;
  border-radius: 999vw;
  background: transparent;
  pointer-events: none;
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
}

/* Button Shadow Container */
.button-shadow {
  --shadow-cuttoff-fix: 2em;
  position: absolute;
  width: calc(100% + var(--shadow-cuttoff-fix));
  height: calc(100% + var(--shadow-cuttoff-fix));
  top: calc(0% - var(--shadow-cuttoff-fix) / 2);
  left: calc(0% - var(--shadow-cuttoff-fix) / 2);
  filter: blur(clamp(2px, 0.125em, 12px));
  -webkit-filter: blur(clamp(2px, 0.125em, 12px));
  -moz-filter: blur(clamp(2px, 0.125em, 12px));
  -ms-filter: blur(clamp(2px, 0.125em, 12px));
  overflow: visible;
  pointer-events: none;
}

/* Shadow */
.button-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 999vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  width: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  height: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  left: calc(var(--shadow-cuttoff-fix) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  overflow: visible;
  opacity: 1;
}

/* ========== BUTTON BASE STYLES ========== */

.glass-button {
  /* Basic Styling */
  --border-width: clamp(1px, 0.0625em, 4px);
  all: unset;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  pointer-events: auto;
  z-index: 3;
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 999vw;
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0 0 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -webkit-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -moz-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -ms-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
}

.glass-button:hover {
  transform: scale(0.975);
  backdrop-filter: blur(0.01em);
  -webkit-backdrop-filter: blur(0.01em);
  -moz-backdrop-filter: blur(0.01em);
  -ms-backdrop-filter: blur(0.01em);
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25),
    0 0 0.05em 0.1em inset rgba(255, 255, 255, 0.5),
    0 0 0 0 rgba(255, 255, 255, 1);
}

/* Button Text */
.glass-button span {
  position: relative;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  letter-spacing: -0.05em;
  font-weight: 500;
  font-size: 1em;
  color: rgb(255, 255, 255);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0em 0.25em 0.05em rgba(0, 0, 0, 0.1);
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  padding-inline: 1.5em;
  padding-block: 0.875em;
}

.glass-button:hover span {
  text-shadow: 0.025em 0.025em 0.025em rgba(0, 0, 0, 0.12);
}

/* Text */
.glass-button span::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  width: calc(100% - var(--border-width)); /* Prevent overlapping border */
  height: calc(100% - var(--border-width));
  top: calc(0% + var(--border-width) / 2);
  left: calc(0% + var(--border-width) / 2);
  box-sizing: border-box;
  border-radius: 999vw;
  overflow: clip;
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  z-index: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  background-size: 200% 200%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  transition: background-position calc(var(--anim--hover-time) * 1.25)
      var(--anim--hover-ease),
    --angle-2 calc(var(--anim--hover-time) * 1.25) var(--anim--hover-ease);
}

.glass-button:hover span::after {
  background-position: 25% 50%;
}

.glass-button:active span::after {
  background-position: 50% 15%;
  --angle-2: -15deg;
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
  .glass-button span::after,
  .glass-button:active span::after {
    --angle-2: -45deg;
  }
}

/* ========== BUTTON OUTLINE ========== */

/* Outline */
.glass-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 999vw;
  width: calc(100% + var(--border-width));
  height: calc(100% + var(--border-width));
  top: calc(0% - var(--border-width) / 2);
  left: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  box-sizing: border-box;
  background: conic-gradient(
      from var(--angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.5)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease),
    --angle-1 500ms ease;
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255, 255, 255, 0.5);
}

.glass-button:hover::after {
  --angle-1: -125deg;
}

.glass-button:active::after {
  --angle-1: -75deg;
}

@media (hover: none) and (pointer: coarse) {
  .glass-button::after,
  .glass-button:hover::after,
  .glass-button:active::after {
    --angle-1: -75deg;
  }
}

/* Shadow Hover */
.button-wrap:has(.glass-button:hover) .button-shadow {
  filter: blur(clamp(2px, 0.0625em, 6px));
  -webkit-filter: blur(clamp(2px, 0.0625em, 6px));
  -moz-filter: blur(clamp(2px, 0.0625em, 6px));
  -ms-filter: blur(clamp(2px, 0.0625em, 6px));
  transition: filter var(--anim--hover-time) var(--anim--hover-ease);
}

.button-wrap:has(button:hover) .button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) - 0.875em);
  opacity: 1;
}

/* Rotation */
.button-wrap:has(button:active) {
  transform: rotate3d(1, 0, 0, 25deg);
}

.button-wrap:has(button:active) button {
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.125em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0.225em 0.05em 0 rgba(0, 0, 0, 0.05),
    0 0.25em 0 0 rgba(255, 255, 255, 0.75),
    inset 0 0.25em 0.05em 0 rgba(0, 0, 0, 0.15);
}

.button-wrap:has(button:active) .button-shadow {
  filter: blur(clamp(2px, 0.125em, 12px));
  -webkit-filter: blur(clamp(2px, 0.125em, 12px));
  -moz-filter: blur(clamp(2px, 0.125em, 12px));
  -ms-filter: blur(clamp(2px, 0.125em, 12px));
}

.button-wrap:has(button:active) .button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  opacity: 0.75;
}

.button-wrap:has(button:active) span {
  text-shadow: 0.025em 0.25em 0.05em rgba(0, 0, 0, 0.12);
}




/* Legacy global rules — kept neutral; real styling lives in the
   "GLOBAL DARK GLASS INPUTS" block at the bottom of this file. */
input::placeholder,
.form-control::placeholder {
  opacity: 1;
}






.dropdown-menu {
      background: rgba(255, 255, 255, 0.3);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
}

.dropdown-menu .dropdown-item:hover {
  color: black !important;
}

.dropdown-menu .dropdown-item:active {
  background-color: white !important;
  color: black !important;
}

















  .page-title {
    font-weight: 700;
    font-size: 1.8rem;
    color: #d8d8d8;
  }


  .card {
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
    border-radius: 14px;
    border: none;
    transition: transform 0.2s ease;
  }

  .card:hover {
    transform: translateY(-4px);
  }

  .card-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #c0c0c0;
  }

  .card ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    max-height: 150px;
    overflow-y: auto;
  }

  .card ul li {
    font-size: 0.92rem;
    padding: 3px 0;
    color: #d1d1d1;
  }

  .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    
      background: rgba(255, 255, 255, 0.1);
      box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 6px inset;
      backdrop-filter: blur(15px);
  }

  .modal-header {
    border-bottom: none;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .modal-title {
    font-weight: 700;
    color: #cfcfcf;
    font-size: 1.3rem;
  }

  .modal-body {
      background-color: transparent !important;
    padding: 30px;
    border-top: 1px solid #4d4d4d;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding-bottom: 0 !important;
  }

.modal-footer {
  padding-top: 0 !important;
  border-top: none;
}



.profile-info h4 {
  color: white;
}

.profile-info p {
  color: rgb(172, 172, 172);
}





/* ============================================
   AUTH / LOGIN PAGE
   ============================================ */
.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #1b1530;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(60% 50% at 80% 0%, rgba(124, 92, 220, 0.20), transparent 65%),
        radial-gradient(50% 40% at 0% 100%, rgba(58, 32, 130, 0.22), transparent 65%),
        linear-gradient(180deg, rgba(10, 5, 25, 0.18), rgba(10, 5, 25, 0.30));
    z-index: 0;
    pointer-events: none;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    box-sizing: border-box;
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 410px;
    margin: 0;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: clamp(1.75rem, 4vw, 2.4rem);
    color: #fff;
    box-shadow:
        0 30px 80px -25px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.login-container::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    pointer-events: none;
}

.login-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(159, 134, 255, 0.18), transparent 35%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.login-container:hover::before { opacity: 1; }

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0 0.25rem;
}
.login-brand__logo {
    width: clamp(130px, 32vw, 180px);
    height: clamp(130px, 32vw, 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.4));
}
.login-brand__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.messages {
    margin-top: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.35);
}
.messages .alert {
    color: #ffb4b4;
    font-size: 0.9rem;
}

/* Legacy support — keep .Photo working for any other page that uses it */
.Photo {
    display: flex;
    justify-content: center;
    padding: 30px 0 20px;
}
.Photo img { width: 50%; }


/* ============================================
   GLOBAL RESPONSIVE RULES
   ============================================ */
img { max-width: 100%; height: auto; }

@media (max-width: 1024px) {
    .Header {
        padding: 0 3%;
    }
    .media-container {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .Header {
        height: auto;
        min-height: 7vh;
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: space-between;
    }
    .logo-container {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.4rem 0.75rem;
        max-width: 100%;
    }
    .logo {
        width: 42px;
        min-width: 42px;
    }
    .ml { margin-left: 0; }
    .but {
        font-size: 0.92rem;
        padding: 0.25rem 0.5rem;
    }
    .account {
        width: 38px;
        height: 38px;
    }
    .account-name {
        display: none;
    }
    .media-container {
        width: 100%;
        height: auto;
        margin: 1rem 0;
    }
    .media-title {
        max-width: 60vw;
    }
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    .login-container {
        border-radius: 18px;
    }
    .login-brand__logo {
        border-radius: 18px;
    }
    .form-input {
        font-size: 16px; /* prevents iOS zoom on focus */
    }
    .Header {
        padding: 0.5rem 0.75rem;
    }
    .but {
        font-size: 0.85rem;
    }
    .dropdown-menu {
        font-size: 0.9rem;
    }
}

@media (min-width: 1600px) {
    .login-container {
        max-width: 480px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-container,
    .submit-button,
    .submit-button::before,
    .submit-button i {
        animation: none !important;
        transition: none !important;
    }
}


#page-loader {
    position: fixed;
    inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
    background: linear-gradient(45deg, #ffffff, rgb(127, 127, 127));
    z-index: 9999;            /* above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

#page-loader .loader-image {
    width: 80px;              /* adjust as you like */
    height: auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================
   APP SHELL — SIDEBAR + MAIN
   ============================================ */
:root {
    --sidebar-w: 260px;
    --sidebar-bg: rgba(15, 10, 30, 0.55);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-fg: rgba(255, 255, 255, 0.78);
    --sidebar-fg-muted: rgba(255, 255, 255, 0.45);
    --sidebar-fg-active: #ffffff;
    --accent: #8b6dff;
    --accent-glow: rgba(124, 92, 220, 0.45);
}

.app-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #0f0a1e;
    background-size: cover;
    background-position: top center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.app-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(60% 50% at 80% 0%, rgba(124, 92, 220, 0.18), transparent 65%),
        radial-gradient(50% 40% at 0% 100%, rgba(58, 32, 130, 0.20), transparent 65%),
        linear-gradient(180deg, rgba(10, 5, 25, 0.30), rgba(10, 5, 25, 0.55));
    z-index: 0;
    pointer-events: none;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.85rem 1rem;
    gap: 0.5rem;
    background: var(--sidebar-bg);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 0 0 50px -10px rgba(0, 0, 0, 0.5);
    color: var(--sidebar-fg);
    overflow-y: auto;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem 1.25rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--sidebar-border);
}
.brand-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: #fff;
    flex: 1;
    min-width: 0;
}
.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    flex-shrink: 0;
}
.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, #fff, #c9bbff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
    padding: 0.5rem 0;
}
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-fg-muted);
    padding: 0 0.85rem;
    margin-bottom: 0.4rem;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--sidebar-fg);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.nav-item .nav-item-icon {
    width: 20px;
    font-size: 0.95rem;
    text-align: center;
    color: var(--sidebar-fg-muted);
    transition: color 0.2s ease;
}
.nav-item .nav-item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-item .nav-item-caret {
    font-size: 0.7rem;
    color: var(--sidebar-fg-muted);
    transition: transform 0.2s ease;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-fg-active);
}
.nav-item:hover .nav-item-icon { color: var(--sidebar-fg-active); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.18), rgba(100, 82, 163, 0.10));
    color: var(--sidebar-fg-active);
    box-shadow: inset 0 0 0 1px rgba(139, 109, 255, 0.25);
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #c9bbff, var(--accent));
    box-shadow: 0 0 10px var(--accent-glow);
}
.nav-item.active .nav-item-icon { color: #c9bbff; }

.nav-item--dropdown[aria-expanded="true"] .nav-item-caret { transform: rotate(90deg); }
.nav-item--dropdown[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-fg-active);
}

.sidebar-dropdown {
    background: rgba(25, 18, 50, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--sidebar-border) !important;
    border-radius: 10px !important;
    padding: 0.35rem !important;
    min-width: 200px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
}
.sidebar-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.75) !important;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    font-size: 0.88rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-dropdown .dropdown-item:hover,
.sidebar-dropdown .dropdown-item:focus {
    background: rgba(139, 109, 255, 0.18) !important;
    color: #fff !important;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--sidebar-border);
}
.user-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sidebar-border);
    border-radius: 12px;
    color: var(--sidebar-fg);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.user-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}
.user-card::after { display: none; } /* hide bootstrap caret */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sidebar-border);
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.05rem;
}
.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.user-client {
    font-size: 0.74rem;
    color: var(--sidebar-fg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.user-caret {
    color: var(--sidebar-fg-muted);
    font-size: 0.85rem;
}

.sidebar-user-menu {
    background: rgba(25, 18, 50, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--sidebar-border) !important;
    border-radius: 12px !important;
    padding: 0.35rem !important;
    min-width: 220px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
}
.sidebar-user-menu .dropdown-header-info {
    padding: 0.6rem 0.75rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.sidebar-user-menu .dropdown-header-info strong {
    color: #fff;
    font-size: 0.9rem;
}
.sidebar-user-menu .dropdown-header-info small {
    color: var(--sidebar-fg-muted);
    font-size: 0.75rem;
}
.sidebar-user-menu .dropdown-divider {
    border-color: var(--sidebar-border);
    margin: 0.35rem 0;
}
.sidebar-user-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.78) !important;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-user-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--sidebar-fg-muted);
}
.sidebar-user-menu .dropdown-item:hover,
.sidebar-user-menu .dropdown-item:focus {
    background: rgba(139, 109, 255, 0.16) !important;
    color: #fff !important;
}
.sidebar-user-menu .dropdown-item:hover i,
.sidebar-user-menu .dropdown-item:focus i { color: #c9bbff; }
.sidebar-user-menu .dropdown-item.text-danger { color: #ff8aa7 !important; }
.sidebar-user-menu .dropdown-item.text-danger:hover { background: rgba(255, 100, 130, 0.15) !important; color: #ff8aa7 !important; }

/* Mobile toggle + backdrop */
.sidebar-toggle {
    position: fixed;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 1200;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--sidebar-border);
    background: rgba(20, 14, 40, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s ease;
}
.sidebar-toggle:hover { background: rgba(20, 14, 40, 0.9); }
body.sidebar-open .sidebar-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 15, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.app-main {
    position: relative;
    z-index: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.5rem;
    box-sizing: border-box;
}

/* Tablet */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.is-open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
        padding: 4.25rem 1rem 1rem;
    }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-close { display: inline-flex; }
    body.sidebar-open { overflow: hidden; }
}

/* Mobile */
@media (max-width: 480px) {
    :root { --sidebar-w: 86vw; }
    .app-sidebar { max-width: 320px; }
    .app-main { padding: 4rem 0.85rem 1rem; }
}


/* ============================================
   GLASSY ACTION BUTTONS (Upload / Add / Publish)
   override the legacy .glass-button + .button-wrap
   ============================================ */
.button-wrap {
    position: relative;
    display: inline-block;
    border-radius: 14px;
    background: transparent;
    pointer-events: auto;
    transition: transform 0.2s ease;
}
.button-wrap .button-shadow { display: none !important; }

@property --gb-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.glass-button {
    all: unset;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 140px;
    height: 44px;
    padding: 0 1.4rem;
    border-radius: 14px;
    cursor: pointer;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(139, 109, 255, 0.55), rgba(100, 82, 163, 0.45)),
        rgba(255, 255, 255, 0.06);
    border: none;
    outline: none;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 10px 24px -12px rgba(124, 92, 220, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
    transition:
        transform 0.18s ease,
        background 0.25s ease,
        filter 0.25s ease;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Animated white arc that travels around the border */
.glass-button::after {
    content: "";
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(
        from var(--gb-angle, 0deg),
        rgba(255, 255, 255, 0) 0deg,
        rgba(255, 255, 255, 0) 220deg,
        rgba(255, 255, 255, 0.95) 305deg,
        rgba(255, 255, 255, 0) 360deg
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    animation: gbBorderSpin 3s linear infinite;
}

@keyframes gbBorderSpin {
    to { --gb-angle: 360deg; }
}

/* Fallback for browsers without @property: rotate the whole pseudo-element */

.glass-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 20%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 80%
    );
    transform: skewX(-18deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.glass-button span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.glass-button span::after { content: none !important; }

.glass-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow:
        0 14px 28px -10px rgba(124, 92, 220, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}
.glass-button:hover::after {
    animation-duration: 1.5s;
}
.glass-button:hover::before { left: 130%; }
.glass-button:active {
    transform: translateY(0) scale(0.98);
    filter: brightness(0.98);
}

.button-wrap:has(.glass-button:active) { transform: none; }
.button-wrap:has(.glass-button:active) .glass-button {
    box-shadow:
        0 6px 16px -8px rgba(124, 92, 220, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

@media (max-width: 480px) {
    .glass-button {
        min-width: 120px;
        height: 42px;
        font-size: 0.88rem;
        padding: 0 1.1rem;
    }
}


/* ============================================
   CUSTOM POPUP / TOAST SYSTEM (Swal replacement)
   ============================================ */
/* Popups above everything, including Bootstrap modal/backdrop */
.cp-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(8, 4, 20, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

/* Bootstrap modal stacking: backdrop STRICTLY below the dialog */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show { z-index: 1040 !important; pointer-events: auto; }
/* Inactive / orphan backdrops must never render */
.modal-backdrop:not(.show) { display: none !important; }

.modal,
.modal.fade,
.modal.show {
    z-index: 1060 !important;
    pointer-events: auto !important;
}
.modal-dialog {
    z-index: 1061 !important;
    pointer-events: auto !important;
    position: relative;
}
.modal-content,
.modal-header,
.modal-body,
.modal-footer {
    pointer-events: auto !important;
    position: relative;
    z-index: 1062;
}

/* Brute-force: while a custom popup is open, NO Bootstrap backdrop can render */
body:has(.cp-overlay) .modal-backdrop,
body.cp-open .modal-backdrop {
    display: none !important;
}
.cp-overlay.cp-show { opacity: 1; }
.cp-overlay.cp-leave { opacity: 0; }

.cp-modal {
    position: relative;
    z-index: 2147483647;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: clamp(1.4rem, 3vw, 1.8rem);
    border-radius: 18px;
    background: rgba(20, 14, 40, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    color: #fff;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transform: translateY(8px) scale(0.97);
    opacity: 0;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    text-align: center;
    font-family: inherit;
    pointer-events: auto;
}
.cp-modal--wide { max-width: 680px; }
.cp-modal--xwide { max-width: 860px; }
.cp-modal::-webkit-scrollbar { width: 6px; }
.cp-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}
/* Any meta-grid / forms inside a popup should be left-aligned */
.cp-modal .device-info,
.cp-modal .sched-form,
.cp-modal .pl-form,
.cp-modal .meta-grid,
.cp-modal .meta-grid__cell,
.cp-modal .section-title { text-align: left; }
.cp-overlay.cp-show .cp-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cp-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cp-icon--success { background: rgba(86, 195, 130, 0.16); color: #6ee7a4; }
.cp-icon--success svg circle, .cp-icon--success svg path { stroke: currentColor; }
.cp-icon--success svg path { animation: cpDraw 0.4s 0.05s ease-out both; stroke-dasharray: 50; stroke-dashoffset: 50; }
.cp-icon--error   { background: rgba(255, 100, 130, 0.16); color: #ff7a96; }
.cp-icon--error svg circle, .cp-icon--error svg path { stroke: currentColor; }
.cp-icon--warning { background: rgba(255, 196, 84, 0.16); color: #ffcb6b; }
.cp-icon--warning svg circle, .cp-icon--warning svg path { stroke: currentColor; }
.cp-icon--warning svg circle:last-child { fill: currentColor; stroke: none; }
.cp-icon--info    { background: rgba(124, 156, 255, 0.16); color: #92b4ff; }
.cp-icon--info svg circle, .cp-icon--info svg path { stroke: currentColor; }
.cp-icon--info svg circle:last-child { fill: currentColor; stroke: none; }
.cp-icon--question { background: rgba(159, 134, 255, 0.18); color: #c9bbff; }
.cp-icon--question svg circle, .cp-icon--question svg path { stroke: currentColor; }
.cp-icon--question svg circle:last-child { fill: currentColor; stroke: none; }

@keyframes cpDraw { to { stroke-dashoffset: 0; } }

.cp-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.cp-title .cp-subtitle,
.cp-text .cp-subtitle {
    display: inline-block;
    margin-top: 0.2rem;
    padding: 0.18rem 0.55rem;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(139, 109, 255, 0.3);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #d8ccff;
    letter-spacing: 0;
}
.cp-title .text-muted,
.cp-text .text-muted { color: #c9bbff !important; }
.cp-text {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.cp-text:last-child { margin-bottom: 0; }

.cp-input-wrap {
    margin: 0.75rem 0;
}
.cp-input {
    width: 100%;
    height: 44px;
    padding: 0 0.95rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.95rem;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.cp-input::placeholder { color: rgba(255, 255, 255, 0.38); }
.cp-input:focus {
    border-color: rgba(159, 134, 255, 0.55);
    background: rgba(15, 10, 30, 0.7);
    box-shadow: 0 0 0 3px rgba(124, 92, 220, 0.18);
}
.cp-textarea { height: auto; min-height: 100px; padding: 0.7rem 0.95rem; resize: vertical; }

.cp-validation {
    margin: 0.5rem 0;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 100, 130, 0.12);
    border: 1px solid rgba(255, 100, 130, 0.3);
    color: #ff8aa7;
    font-size: 0.85rem;
}

.cp-loading {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}
.cp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #c9bbff;
    border-radius: 50%;
    animation: cpSpin 0.8s linear infinite;
}
@keyframes cpSpin { to { transform: rotate(360deg); } }

.cp-actions {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}
.cp-btn {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 110px;
    height: 42px;
    padding: 0 1.2rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.cp-btn i { line-height: 1; }
.cp-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.cp-btn:focus-visible { box-shadow: 0 0 0 3px rgba(159, 134, 255, 0.45); }

.cp-btn--primary {
    background: linear-gradient(135deg, #8b6dff 0%, #6452a3 60%, #4a3a82 100%);
    box-shadow:
        0 8px 22px -10px rgba(124, 92, 220, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.cp-btn--primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.cp-btn--primary:active { transform: translateY(0); filter: brightness(0.96); }

.cp-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
}
.cp-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.cp-btn--danger {
    background: linear-gradient(135deg, #ff5f7a 0%, #c0405a 100%);
    box-shadow:
        0 8px 22px -10px rgba(220, 60, 90, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cp-btn--danger:hover { transform: translateY(-1px); filter: brightness(1.08); }

.cp-footer {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
}

/* ===== Toasts ===== */
.cp-toast {
    position: fixed;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 240px;
    max-width: 360px;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    color: #fff;
    background: rgba(20, 14, 40, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    box-shadow:
        0 18px 40px -16px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    font-family: inherit;
}
.cp-toast--show { opacity: 1; transform: translateY(0); }
.cp-toast .cp-icon {
    width: 30px;
    height: 30px;
    margin: 0;
    flex-shrink: 0;
}
.cp-toast__body { flex: 1; min-width: 0; }
.cp-toast__title { font-weight: 600; font-size: 0.92rem; }
.cp-toast__text  { font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); margin-top: 2px; }

.cp-toast--top-end     { top: 1rem; right: 1rem; }
.cp-toast--top-start   { top: 1rem; left: 1rem; }
.cp-toast--top         { top: 1rem; left: 50%; transform: translate(-50%, -12px); }
.cp-toast--top.cp-toast--show { transform: translate(-50%, 0); }
.cp-toast--bottom-end  { bottom: 1rem; right: 1rem; }
.cp-toast--bottom-start{ bottom: 1rem; left: 1rem; }
.cp-toast--bottom      { bottom: 1rem; left: 50%; transform: translate(-50%, 12px); }
.cp-toast--bottom.cp-toast--show { transform: translate(-50%, 0); }
.cp-toast--center      { top: 50%; left: 50%; transform: translate(-50%, calc(-50% - 12px)); }
.cp-toast--center.cp-toast--show { transform: translate(-50%, -50%); }

@media (max-width: 480px) {
    .cp-modal { padding: 1.25rem; }
    .cp-actions { flex-direction: column; gap: 0.5rem; }
    .cp-btn { width: 100%; }
    .cp-toast { min-width: 0; max-width: calc(100vw - 2rem); }
}


/* ============================================
   GLOBAL DARK GLASS INPUTS
   Applies to: <input>, <textarea>, <select>, .form-control, .form-select
   Excluded:   .form-input (login), .cp-input (popup) — already styled
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input:not([type]),
textarea,
select,
.form-control,
.form-select {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 0.95rem;
    margin-bottom: 1rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: none;
    -webkit-appearance: none;
            appearance: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

/* No bottom margin where it would break layout (groups, last-of-row, popups) */
.input-group > input,
.input-group > .form-control,
.input-group > .form-select,
.input-group > select,
.input-group > textarea,
.login-field > .form-input,
.cp-input,
input[type="checkbox"],
input[type="radio"] {
    margin-bottom: 0;
}

/* Vertical rhythm for stacked form rows / Bootstrap groups */
.form-group,
.mb-3,
.row > [class*="col-"] > .form-group:last-child {
    margin-bottom: 1rem;
}
.form-group:last-child,
.row:last-child > [class*="col-"] > .form-group {
    margin-bottom: 0;
}

/* Labels paired with inputs — small gap, then input adds its own bottom space */
label + input,
label + textarea,
label + select,
.form-label + input,
.form-label + textarea,
.form-label + select,
.form-label + .form-control,
.form-label + .form-select {
    margin-top: 0.15rem;
}

textarea,
.form-control[as="textarea"],
textarea.form-control {
    height: auto;
    min-height: 110px;
    padding: 0.7rem 0.95rem;
    resize: vertical;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.40);
    opacity: 1;
}

input:hover,
textarea:hover,
select:hover,
.form-control:hover,
.form-select:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 10, 30, 0.62);
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(159, 134, 255, 0.55);
    background: rgba(15, 10, 30, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 220, 0.18) !important;
    color: #fff;
}

input:disabled,
textarea:disabled,
select:disabled,
.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(15, 10, 30, 0.35);
}

/* Selects: dark dropdown caret + matching panel */
select,
.form-select {
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23c9bbff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.658l-4.796 5.482a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px;
    cursor: pointer;
}
select option,
.form-select option {
    background: #1a1130;
    color: #fff;
}

/* Webkit autofill — keep dark, don't flash bright */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 99999s ease-in-out 0s,
                color 99999s ease-in-out 0s,
                box-shadow 99999s ease-in-out 0s;
}

/* File input */
input[type="file"] {
    width: 100%;
    padding: 0.55rem 0.7rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
}
input[type="file"]::file-selector-button {
    margin-right: 0.85rem;
    padding: 0.4rem 0.85rem;
    background: linear-gradient(135deg, #8b6dff, #6452a3);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease;
}
input[type="file"]::file-selector-button:hover { filter: brightness(1.08); }

/* Range slider */
input[type="range"] {
    width: 100%;
    height: 6px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9bbff, #8b6dff);
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(124, 92, 220, 0.45);
    cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9bbff, #8b6dff);
    border: 2px solid #fff;
    cursor: pointer;
}

/* Labels — readable on dark theme */
label,
.form-label,
.form-check-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

/* Bootstrap input-group polish */
.input-group-text {
    background: rgba(15, 10, 30, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}
.input-group > .form-control,
.input-group > .form-select {
    background-clip: padding-box;
}

/* Scope guard: keep login + popup inputs untouched by the rules above
   (they already declare their own bg/border) */
.login-field .form-input,
.cp-input {
    background: transparent;
}

/* Prevent iOS auto-zoom on focus */
@media (max-width: 480px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select,
    .form-control,
    .form-select {
        font-size: 16px;
    }
}


/* ============================================
   GLASS THEME UTILITIES
   shared building blocks for the inner pages
   ============================================ */

.app-card {
    position: relative;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
        0 24px 60px -22px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    padding: clamp(1.25rem, 2.5vw, 2rem);
    color: #fff;
    overflow: hidden;
}
.app-card + .app-card { margin-top: 1.25rem; }

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-title,
h1.page-title,
h2.page-title,
h3.page-title {
    margin: 0;
    color: #fff;
    font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    letter-spacing: -0.01em;
}
.page-subtitle {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem;
}

.section-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.85rem;
}

.muted { color: rgba(255, 255, 255, 0.55); }

/* ===== Bootstrap .btn variants — glass treatment ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 40px;
    padding: 0 1.05rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(0); filter: brightness(0.95); }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(159, 134, 255, 0.45); outline: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, #8b6dff 0%, #6452a3 60%, #4a3a82 100%);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 8px 22px -10px rgba(124, 92, 220, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff !important;
}
.btn-success {
    background: linear-gradient(135deg, #56c382 0%, #2e8a55 100%);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 8px 22px -10px rgba(46, 138, 85, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff !important;
}
.btn-danger {
    background: linear-gradient(135deg, #ff5f7a 0%, #c0405a 100%);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 8px 22px -10px rgba(220, 60, 90, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    color: #fff !important;
}
.btn-warning {
    background: linear-gradient(135deg, #ffb74a 0%, #d68a1e 100%);
    border-color: rgba(255, 255, 255, 0.16);
    color: #20140a !important;
}
.btn-info {
    background: linear-gradient(135deg, #4ec9ff 0%, #2c89c0 100%);
    color: #fff !important;
}
.btn-secondary,
.btn-light {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
}
.btn-secondary:hover,
.btn-light:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff !important;
}
.btn-outline-primary:hover { background: rgba(139, 109, 255, 0.20); border-color: rgba(159, 134, 255, 0.55); }
.btn-outline-success:hover { background: rgba(86, 195, 130, 0.18); border-color: rgba(86, 195, 130, 0.55); }
.btn-outline-danger:hover  { background: rgba(255, 95, 122, 0.18); border-color: rgba(255, 95, 122, 0.55); }
.btn-outline-secondary:hover { background: rgba(255, 255, 255, 0.10); }

.btn-sm { height: 34px; padding: 0 0.8rem; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 1.4rem; font-size: 1rem; border-radius: 12px; }

.btn-close {
    background: transparent;
    border: none;
    color: #fff;
    opacity: 0.7;
    width: 30px; height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    filter: invert(1);
}
.btn-close:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }

/* ===== Bootstrap card / table / modal / dropdown / alert ===== */
.card {
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    color: #fff;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 14px 36px -16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.card-header,
.card-footer {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
.card-title { color: #fff; font-weight: 600; }
.card-text { color: rgba(255, 255, 255, 0.78); }

.table {
    color: rgba(255, 255, 255, 0.85);
    --bs-table-bg: transparent;
    --bs-table-color: rgba(255, 255, 255, 0.85);
    --bs-table-border-color: rgba(255, 255, 255, 0.06);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.025);
    --bs-table-striped-color: #fff;
    --bs-table-hover-bg: rgba(139, 109, 255, 0.08);
    --bs-table-hover-color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
}
.table thead th {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom-color: rgba(255, 255, 255, 0.10);
    padding: 0.85rem 0.9rem;
}
.table tbody td {
    padding: 0.85rem 0.9rem;
    vertical-align: middle;
    border-color: rgba(255, 255, 255, 0.05);
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.modal-content {
    background: rgba(20, 14, 40, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    color: #fff;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    padding: 1.1rem 1.4rem;
}
.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
    padding: 1rem 1.4rem;
    background: transparent;
}
.modal-title { color: #fff; font-weight: 600; }

.modal-backdrop.show { opacity: 0.6; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: #050310; }

/* dropdown menus (Bootstrap) — keep them dark */
.dropdown-menu {
    background: rgba(20, 14, 40, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.6);
    padding: 0.35rem !important;
    color: #fff;
    min-width: 12rem;
}
.dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.78) !important;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: rgba(139, 109, 255, 0.18) !important;
    color: #fff !important;
}
.dropdown-menu .dropdown-item.text-danger { color: #ff8aa7 !important; }
.dropdown-menu .dropdown-item.text-danger:hover { background: rgba(255, 100, 130, 0.16) !important; color: #ff8aa7 !important; }
.dropdown-menu .dropdown-item i { width: 16px; color: rgba(255, 255, 255, 0.55); }
.dropdown-divider { border-color: rgba(255, 255, 255, 0.08); margin: 0.35rem 0; }
.dropdown-header { color: rgba(255, 255, 255, 0.5); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.65em;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    line-height: 1.2;
}
.badge i {
    font-size: 0.78em;
    line-height: 1;
}
.badge.bg-primary { background: rgba(139, 109, 255, 0.18) !important; color: #c9bbff !important; border-color: rgba(139, 109, 255, 0.35); }
.badge.bg-success { background: rgba(86, 195, 130, 0.18) !important; color: #6ee7a4 !important; border-color: rgba(86, 195, 130, 0.35); }
.badge.bg-danger  { background: rgba(255, 95, 122, 0.18) !important; color: #ff8aa7 !important; border-color: rgba(255, 95, 122, 0.35); }
.badge.bg-warning { background: rgba(255, 196, 84, 0.18) !important; color: #ffcb6b !important; border-color: rgba(255, 196, 84, 0.35); }
.badge.bg-info    { background: rgba(124, 156, 255, 0.18) !important; color: #92b4ff !important; border-color: rgba(124, 156, 255, 0.35); }
.badge.bg-secondary { background: rgba(255, 255, 255, 0.08) !important; color: rgba(255,255,255,0.85) !important; border-color: rgba(255,255,255,0.14); }

/* ===== Alerts ===== */
.alert {
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}
.alert-success { background: rgba(86, 195, 130, 0.12); border-color: rgba(86, 195, 130, 0.35); color: #b9f0d0; }
.alert-danger  { background: rgba(255, 95, 122, 0.12); border-color: rgba(255, 95, 122, 0.35); color: #ffc4cf; }
.alert-warning { background: rgba(255, 196, 84, 0.12); border-color: rgba(255, 196, 84, 0.35); color: #ffe2a4; }
.alert-info    { background: rgba(124, 156, 255, 0.12); border-color: rgba(124, 156, 255, 0.35); color: #cfdcff; }

/* ===== Form check (checkboxes/radios) ===== */
.form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0;
    margin-bottom: 0.4rem;
}
.form-check-input {
    width: 18px; height: 18px;
    margin: 0;
    background-color: rgba(15, 10, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:hover { border-color: rgba(159, 134, 255, 0.55); }
.form-check-input:checked {
    background-color: #8b6dff;
    border-color: #8b6dff;
    box-shadow: 0 0 0 3px rgba(124, 92, 220, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8l4 4 6-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 75%;
}
.form-check-input[type="radio"]:checked {
    background-image: radial-gradient(circle, #fff 0 4px, transparent 5px);
}
.form-check-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 0;
}

/* Bootstrap form-switch */
.form-switch .form-check-input {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23ffffff'/%3E%3C/svg%3E");
    background-position: 2px center;
}
.form-switch .form-check-input:checked {
    background-position: right 2px center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23ffffff'/%3E%3C/svg%3E");
}

/* ===== Lists used in card bodies ===== */
.list-group {
    background: transparent;
}
.list-group-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Settings widget redesign ===== */
.settings-widget {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 14px 32px -16px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
    height: 100%;
    min-width: 0;
}
.settings-widget:hover {
    transform: translateY(-2px);
    border-color: rgba(159, 134, 255, 0.4);
    background: rgba(20, 14, 40, 0.6);
    box-shadow:
        0 20px 42px -18px rgba(124, 92, 220, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #fff;
}
.settings-widget-icon-wrap {
    width: 44px; height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.25), rgba(100, 82, 163, 0.10));
    border: 1px solid rgba(139, 109, 255, 0.25);
    color: #c9bbff;
    font-size: 1.15rem;
}
.settings-widget__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.settings-widget .settings-widget-icon { color: #c9bbff; text-shadow: 0 0 24px rgba(159, 134, 255, 0.4); }
.settings-widget .settings-title {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.3;
    text-align: left;
}
.settings-widget .settings-description {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.35;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===== History / log entries ===== */
.logs-container {
    background: rgba(15, 10, 30, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-radius: 18px !important;
    padding: clamp(1.25rem, 2vw, 2rem) !important;
    box-shadow:
        0 24px 60px -22px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    color: #fff;
    box-shadow: none;
}
.logs-title {
    color: #fff !important;
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0 0 1rem;
}
.log-entry {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.95rem;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent) !important;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.log-entry:hover {
    background: linear-gradient(90deg, rgba(139, 109, 255, 0.10), transparent) !important;
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}
.log-entry .log-time {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}
.log-entry .log-action {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.92rem;
}

/* ===== Profile/account banner + section ===== */
.bg-pic {
    position: relative;
    height: 160px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    margin-bottom: -60px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.bg-pic::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 10, 30, 0.55) 100%);
}

.profile-info {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 0 1.5rem 1.25rem;
    z-index: 2;
}
.profile-info .profile-pic-wrap,
.profile-info .profile-image {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(20, 14, 40, 0.8);
    border: 3px solid rgba(20, 14, 40, 0.95);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}
.profile-info .profile-pic-wrap img,
.profile-info .profile-image img,
.profile-info img.profile-pic {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.profile-info h4 {
    color: #fff;
    margin: 0;
    font-weight: 600;
}
.profile-info p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
}

.section {
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: clamp(1rem, 2vw, 1.5rem);
    color: #fff;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        0 16px 40px -18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    margin-bottom: 1.25rem;
}
.section h5,
.section .section-heading {
    color: #fff;
    font-weight: 600;
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

/* ===== Roles management — abilities groups ===== */
.abilities-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 0.85rem !important;
    color: #fff;
}
.abilities-group strong {
    display: block;
    color: #c9bbff;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.65rem;
}

/* ===== Upload-media split button ===== */
.upload-action.btn-group {
    border-radius: 12px;
    overflow: visible;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.55), rgba(100, 82, 163, 0.45)),
                rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 10px 24px -10px rgba(124, 92, 220, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: #fff;
    transition: filter 0.2s ease, transform 0.15s ease;
}
.upload-action.btn-group:hover { filter: brightness(1.08); transform: translateY(-1px); }
.upload-action .upload-action__main,
.upload-action .upload-action__caret {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    height: 44px;
    box-shadow: none !important;
    border-radius: 0;
    transform: none !important;
    filter: none !important;
}
.upload-action .upload-action__main {
    padding: 0 0.95rem 0 1.1rem;
    font-weight: 600;
    gap: 0.5rem;
    border-top-left-radius: 11px;
    border-bottom-left-radius: 11px;
}
.upload-action .upload-action__caret {
    border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
    padding: 0 0.85rem;
    border-top-right-radius: 11px;
    border-bottom-right-radius: 11px;
}
.upload-action .upload-action__caret::after {
    border-top-color: #fff;
    border-right-color: transparent;
    border-bottom: 0;
    border-left-color: transparent;
    margin-left: 0;
    opacity: 0.85;
}
.upload-menu {
    min-width: 220px !important;
    padding: 0.4rem !important;
}
.upload-menu .dropdown-item {
    padding: 0.6rem 0.75rem;
}
.upload-menu .dropdown-item .upload-menu__icon {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(139, 109, 255, 0.18);
    color: #c9bbff;
    font-size: 0.85rem;
}

.upload-progress { display: none; } /* legacy inline bar — superseded by .upload-toast */

/* ===== Upload toast (floating upload progress card) ===== */
.upload-toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 2147483646;
    width: min(420px, calc(100vw - 2rem));
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: rgba(20, 14, 40, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 24px 50px -18px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    pointer-events: auto;
    overflow: hidden;
}
.upload-toast.is-visible { transform: translateY(0); opacity: 1; }

.upload-toast__icon {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139, 109, 255, 0.22);
    border: 1px solid rgba(159, 134, 255, 0.35);
    color: #c9bbff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.upload-toast.is-success .upload-toast__icon {
    background: rgba(86, 195, 130, 0.2);
    border-color: rgba(86, 195, 130, 0.45);
    color: #6ee7a4;
}
.upload-toast.is-error .upload-toast__icon {
    background: rgba(255, 95, 122, 0.2);
    border-color: rgba(255, 95, 122, 0.45);
    color: #ff8aa7;
}

.upload-toast__body { flex: 1; min-width: 0; }
.upload-toast__name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upload-toast__meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}
.upload-toast__pct {
    font-weight: 700;
    color: #c9bbff;
    min-width: 2.4rem;
}
.upload-toast__size { flex: 1; }
.upload-toast__eta {
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.upload-toast__bar {
    margin-top: 0.55rem;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.upload-toast__fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c9bbff, #8b6dff);
    border-radius: 999px;
    transition: width 0.18s linear;
    position: relative;
}
.upload-toast__fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: uploadShimmer 1.2s linear infinite;
}
.upload-toast.is-success .upload-toast__fill,
.upload-toast.is-success .upload-toast__fill::after { background: linear-gradient(90deg, #6ee7a4, #2e8a55); animation: none; }
.upload-toast.is-error .upload-toast__fill,
.upload-toast.is-error .upload-toast__fill::after   { background: linear-gradient(90deg, #ff8aa7, #c0405a); animation: none; }
@keyframes uploadShimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

.upload-toast__close {
    all: unset;
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.upload-toast__close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.upload-toast.is-success .upload-toast__close,
.upload-toast.is-error .upload-toast__close { display: none; }

@media (max-width: 480px) {
    .upload-toast { left: 0.75rem; right: 0.75rem; width: auto; bottom: 0.75rem; }
}
.upload-progress progress {
    width: 140px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    -webkit-appearance: none;
    appearance: none;
}
.upload-progress progress::-webkit-progress-bar { background: rgba(255, 255, 255, 0.08); border-radius: 999px; }
.upload-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #c9bbff, #8b6dff); border-radius: 999px; }
.upload-progress progress::-moz-progress-bar    { background: linear-gradient(90deg, #c9bbff, #8b6dff); border-radius: 999px; }

/* ===== Device folders (categories on the Screens column) ===== */
.media-header--with-action { position: relative; }
.media-header .folder-add-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139, 109, 255, 0.15);
    border: 1px solid rgba(159, 134, 255, 0.35);
    color: #c9bbff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.media-header .folder-add-btn:hover {
    background: rgba(139, 109, 255, 0.28);
    border-color: rgba(159, 134, 255, 0.55);
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}

.device-folder {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.device-folder.is-dragging {
    opacity: 0.6;
    border-color: rgba(159, 134, 255, 0.55);
    box-shadow: 0 10px 28px -10px rgba(124, 92, 220, 0.55);
}
.device-folder__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
}
.device-folder:hover .device-folder__head { background: rgba(139, 109, 255, 0.08); }
.device-folder__icon {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(159, 134, 255, 0.28);
    color: #c9bbff;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.device-folder__name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}
.device-folder__count {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(159, 134, 255, 0.3);
    color: #d8ccff;
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.device-folder__select {
    margin: 0 !important;
    flex-shrink: 0;
}
.device-folder__select .checkmark {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
}
.device-folder__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-left: auto;
}
.device-folder:hover .device-folder__actions { opacity: 1; }
.folder-icon-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.folder-icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.folder-icon-btn--danger:hover { background: rgba(255, 100, 130, 0.18); color: #ff8aa7; }
.folder-icon-btn--grab { cursor: grab; }
.folder-icon-btn--grab:active { cursor: grabbing; }
.device-folder__chevron {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}
.device-folder.is-collapsed .device-folder__chevron { transform: rotate(-90deg); }
.device-folder__body {
    padding: 0.5rem 0.75rem 0.75rem;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
    overflow: hidden;
}
.device-folder__body .device-folder {
    /* Nested folders get an inset border-left to show hierarchy */
    margin-left: 0;
    background: rgba(255, 255, 255, 0.015);
    border-color: rgba(255, 255, 255, 0.05);
}
.device-folder__children {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 4px;
    margin-top: 0.4rem;
    padding: 0;
    border: none;
}
.device-folder__children:empty { margin: 0; }
/* Drag-hover feedback when a folder is being nested into another */
.device-folder.drag-hover-folder > .device-folder__head {
    background: rgba(139, 109, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(159, 134, 255, 0.45);
}
.device-folder.drag-hover-folder > .device-folder__body {
    background: rgba(139, 109, 255, 0.08);
    border-radius: 8px;
}
.device-folder.is-collapsed .device-folder__body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.device-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 4px;
    padding: 0;
    border-radius: 12px;
    border: 1.5px dashed transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease, padding 0.25s ease, min-height 0.25s ease, box-shadow 0.25s ease;
}
.device-drop.drag-hover {
    border-color: rgba(159, 134, 255, 0.7) !important;
    background:
      repeating-linear-gradient(135deg, rgba(139, 109, 255, 0.18) 0 10px, rgba(20, 14, 40, 0.6) 10px 20px) !important;
    padding: 0.6rem !important;
    min-height: 56px;
    box-shadow:
      inset 0 0 0 1px rgba(159, 134, 255, 0.45),
      0 10px 26px -12px rgba(124, 92, 220, 0.5) !important;
    animation: dropZoneBreath 1.6s ease-in-out infinite;
}
.device-drop.drag-hover::after {
    content: "\f063  Drop here";  /* fa-caret-down + text */
    font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif;
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(20, 14, 40, 0.9);
    border: 1px solid rgba(159, 134, 255, 0.55);
    color: #c9bbff;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: dropBadgeIn 0.25s ease-out 0.05s forwards;
}
.device-drop.drag-hover:not(:empty)::after { display: none; }  /* hide badge when zone has items */

/* Kill the legacy light-blue placeholder colors across every variant. */
.placeholder,
p.placeholder,
div.placeholder,
.drop-placeholder,
.dropPlaceholder,
.media-item.placeholder {
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.28), rgba(20, 14, 40, 0.7)) !important;
    border: 2px dashed rgba(201, 187, 255, 0.55) !important;
    color: #c9bbff !important;
}
@keyframes dropZoneBreath {
    0%, 100% {
        box-shadow: inset 0 0 0 1px rgba(159, 134, 255, 0.30), 0 10px 26px -12px rgba(124, 92, 220, 0.4);
    }
    50% {
        box-shadow: inset 0 0 0 1px rgba(159, 134, 255, 0.55), 0 14px 32px -10px rgba(124, 92, 220, 0.65);
    }
}
@keyframes dropBadgeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.device-drop__empty { display: none; }

/* Dragged device — dark purple glass ghost that matches theme */
.device-item.is-dragging {
    opacity: 0.85;
    transform: scale(0.985);
    cursor: grabbing;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.22), rgba(20, 14, 40, 0.75)) !important;
    border-color: rgba(159, 134, 255, 0.55) !important;
    box-shadow:
      0 20px 40px -16px rgba(124, 92, 220, 0.55),
      0 0 0 1px rgba(159, 134, 255, 0.40),
      inset 0 1px 0 rgba(255, 255, 255, 0.10);
    filter: saturate(110%);
}
.device-item[draggable="true"] { cursor: grab; }

/* Device drop placeholder — clean translucent purple slab with a subtle pulse. */
.device-placeholder {
    display: block !important;
    width: 100%;
    margin: 6px 0 !important;
    padding: 0 !important;
    background: rgba(139, 109, 255, 0.10) !important;
    border: 1.5px dashed rgba(159, 134, 255, 0.55) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 0 0 1px rgba(159, 134, 255, 0.18) !important;
    position: relative;
    overflow: hidden;
    list-style: none !important;
    color: transparent;
    pointer-events: none;
    animation: devicePlaceholderPulse 1.6s ease-in-out infinite;
}
.device-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 50% 50%, rgba(139, 109, 255, 0.18), transparent 70%);
    pointer-events: none;
}
@keyframes devicePlaceholderPulse {
    0%, 100% {
        background: rgba(139, 109, 255, 0.08) !important;
        border-color: rgba(159, 134, 255, 0.45) !important;
    }
    50% {
        background: rgba(139, 109, 255, 0.14) !important;
        border-color: rgba(159, 134, 255, 0.70) !important;
    }
}

/* ===== Custom cursor-following drag ghost ===== */
.drag-ghost-fly {
    opacity: 0.92 !important;
    pointer-events: none !important;
    transform-origin: 16px 16px;
    box-shadow:
        0 30px 60px -16px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(159, 134, 255, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.25), rgba(20, 14, 40, 0.9)) !important;
    border: 1px solid rgba(159, 134, 255, 0.45) !important;
    border-radius: 12px !important;
    filter: saturate(115%);
    backdrop-filter: blur(14px) saturate(170%);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    animation: ghostWobble 0.35s ease-out;
}
@keyframes ghostWobble {
    0%   { transform: scale(0.9) rotate(-4deg); }
    100% { transform: scale(1) rotate(-1deg); }
}

/* ===== Device Options tiles (inside popup) ===== */
.edit-options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.25rem;
}
@media (max-width: 480px) {
    .edit-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.edit-option-tile {
    all: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    height: 96px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.edit-option-tile:hover {
    transform: translateY(-3px);
    background: rgba(139, 109, 255, 0.14);
    border-color: rgba(159, 134, 255, 0.40);
    color: #fff;
}
.edit-option-tile i {
    font-size: 1.3rem;
    transition: color 0.2s ease;
}
.edit-option-tile.bg-yellow i { color: #ffcb6b; }
.edit-option-tile.bg-purple i { color: #c9bbff; }
.edit-option-tile.bg-orange i { color: #ffb38a; }
.edit-option-tile.bg-green  i { color: #6ee7a4; }
.edit-option-tile.bg-red    i { color: #ff8aa7; }
.edit-option-tile.bg-blue   i { color: #92b4ff; }
.edit-option-tile.bg-yellow,
.edit-option-tile.bg-purple,
.edit-option-tile.bg-orange,
.edit-option-tile.bg-green,
.edit-option-tile.bg-red,
.edit-option-tile.bg-blue {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
}

/* ===== Language switcher in sidebar user menu ===== */
.lang-switcher {
    display: flex;
    gap: 0.3rem;
    padding: 0.25rem 0.35rem 0.45rem;
}
.lang-pill {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lang-pill:hover {
    background: rgba(139, 109, 255, 0.18);
    color: #fff;
    border-color: rgba(159, 134, 255, 0.35);
}
.lang-pill.is-active {
    background: linear-gradient(135deg, #8b6dff, #6452a3);
    border-color: rgba(159, 134, 255, 0.45);
    color: #fff;
}
.lang-pill__flag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.35rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

/* ===== RTL adjustments (Arabic) ===== */
html[dir="rtl"] .sidebar-nav .nav-item.active::before {
    left: auto;
    right: -0.85rem;
    border-radius: 3px 0 0 3px;
}
html[dir="rtl"] .app-main { margin-left: 0; margin-right: var(--sidebar-w); }
html[dir="rtl"] .app-sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--sidebar-border); transform: translateX(100%); }
html[dir="rtl"] .app-sidebar.is-open { transform: translateX(0); }
@media (min-width: 1025px) {
    html[dir="rtl"] .app-sidebar { transform: none; }
}
@media (max-width: 1024px) {
    html[dir="rtl"] .app-main { margin-right: 0; }
    html[dir="rtl"] .sidebar-toggle { left: auto; right: 0.85rem; }
}
html[dir="rtl"] .nav-item { text-align: right; }
html[dir="rtl"] .input-icon { left: auto; right: 1rem; }
html[dir="rtl"] .form-input { padding-left: 0.9rem; padding-right: 2.6rem; }
html[dir="rtl"] .password-toggle { right: auto; left: 0.45rem; }

/* ===== Analytics / System Check page ===== */
.analytics-page .analytics-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
}
.analytics-pill i { color: rgba(201, 187, 255, 0.75); font-size: 0.72rem; }
.pulse-dot {
    animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}

.kpi-card {
    position: relative;
    padding: 1rem 1.1rem 1.1rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        0 14px 32px -18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    color: #fff;
    overflow: hidden;
    height: 100%;
    transition: transform 0.18s ease, border-color 0.2s ease;
}
.kpi-card:hover { transform: translateY(-2px); border-color: rgba(159, 134, 255, 0.30); }
.kpi-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.6;
}
.kpi-card--primary { color: #c9bbff; }
.kpi-card--success { color: #6ee7a4; }
.kpi-card--accent  { color: #d8ccff; }
.kpi-card--info    { color: #92b4ff; }

.kpi-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}
.kpi-card__icon {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(139, 109, 255, 0.30);
    color: currentColor;
    font-size: 1rem;
}
.kpi-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.kpi-card__trend--up   { background: rgba(86, 195, 130, 0.15); color: #6ee7a4; border: 1px solid rgba(86, 195, 130, 0.3); }
.kpi-card__trend--down { background: rgba(255, 95, 122, 0.15); color: #ff8aa7; border: 1px solid rgba(255, 95, 122, 0.3); }
.kpi-card__trend--flat { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); }
.kpi-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
}
.kpi-card__value small {
    font-size: 0.55em;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}
.kpi-card__label {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}
.kpi-card__sub {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Line chart (SVG) ===== */
.mini-chart {
    position: relative;
    width: 100%;
    height: 240px;
}
.mini-chart__svg { width: 100%; height: calc(100% - 28px); display: block; }
.mini-chart__axis {
    display: flex;
    justify-content: space-between;
    padding-top: 0.35rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}
.chart-legend {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
}
.chart-legend i { font-size: 0.6rem; margin-right: 0.35rem; }
.btn-group .btn.is-active {
    background: linear-gradient(135deg, #8b6dff, #6452a3) !important;
    border-color: rgba(159, 134, 255, 0.45) !important;
    color: #fff !important;
}

/* ===== Donut chart ===== */
.donut-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0.5rem auto 1rem;
}
.donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-seg { transition: stroke-dasharray 0.6s ease; }
.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.donut-center__value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.donut-center__label {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.donut-legend li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
}
.donut-legend li strong { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }
.donut-legend .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== Perf rows ===== */
.perf-row {
    display: grid;
    grid-template-columns: 1fr 2fr 80px;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.perf-row:last-child { border-bottom: none; }
.perf-row__label { color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }
.perf-row__bar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; overflow: hidden; }
.perf-row__fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.perf-row__value { text-align: right; color: #fff; font-variant-numeric: tabular-nums; font-size: 0.88rem; }

/* ===== Mini stat squares ===== */
.mini-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    height: 100%;
}
.mini-stat__icon {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(139, 109, 255, 0.18);
    flex-shrink: 0;
    font-size: 0.92rem;
}
.mini-stat__value { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.mini-stat__label { margin-top: 0.15rem; color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }

/* ===== Health list ===== */
.health-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.health-list__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
}
.health-list__item > div { flex: 1; min-width: 0; }
.health-list__title { font-weight: 600; font-size: 0.92rem; color: #fff; }
.health-list__desc  { color: rgba(255, 255, 255, 0.55); font-size: 0.8rem; margin-top: 0.1rem; }
.health-list__status {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.health-list__item--ok   .health-dot { background: #6ee7a4; box-shadow: 0 0 10px rgba(110,231,164,0.55); }
.health-list__item--ok   .health-list__status { background: rgba(86,195,130,0.18); color: #6ee7a4; border: 1px solid rgba(86,195,130,0.3); }
.health-list__item--warn .health-dot { background: #ffcb6b; box-shadow: 0 0 10px rgba(255,203,107,0.55); }
.health-list__item--warn .health-list__status { background: rgba(255,203,107,0.15); color: #ffcb6b; border: 1px solid rgba(255,203,107,0.3); }
.health-list__item--err  .health-dot { background: #ff8aa7; box-shadow: 0 0 10px rgba(255,122,150,0.55); }
.health-list__item--err  .health-list__status { background: rgba(255,95,122,0.18); color: #ff8aa7; border: 1px solid rgba(255,95,122,0.3); }
.health-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.system-check-page .devices-summary__value small { font-size: 0.7em; color: rgba(255, 255, 255, 0.55); }
.status-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.status-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 48px;
    align-items: center;
    gap: 0.85rem;
}
.status-bar__label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
}
.status-bar__track {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}
.status-bar__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
    min-width: 6px;
}
.status-bar__fill--success { background: linear-gradient(90deg, #6ee7a4, #2e8a55); }
.status-bar__fill--accent  { background: linear-gradient(90deg, #c9bbff, #8b6dff); }
.status-bar__fill--muted   { background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06)); }
.status-bar__fill--danger  { background: linear-gradient(90deg, #ff8aa7, #c0405a); }
.status-bar__fill--info    { background: linear-gradient(90deg, #92b4ff, #4ec9ff); }
.status-bar__value {
    color: #fff;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ===== Add-ons page ===== */
.addons-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
}
@media (max-width: 900px) {
    .addons-shell { grid-template-columns: 1fr; }
}

.addons-nav {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.addons-nav__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.addons-nav__item:hover {
    transform: translateY(-1px);
    background: rgba(20, 14, 40, 0.7);
    border-color: rgba(159, 134, 255, 0.25);
}
.addons-nav__item.is-active {
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.28), rgba(100, 82, 163, 0.12));
    border-color: rgba(159, 134, 255, 0.45);
    box-shadow: 0 10px 24px -12px rgba(124, 92, 220, 0.5);
}
.addons-nav__icon {
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139, 109, 255, 0.22);
    border: 1px solid rgba(139, 109, 255, 0.35);
    color: #c9bbff;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.addons-nav__title { font-weight: 600; font-size: 0.95rem; color: #fff; }
.addons-nav__sub   { font-size: 0.78rem; color: rgba(255, 255, 255, 0.55); margin-top: 0.1rem; }

.addons-body {
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: clamp(1.25rem, 2vw, 1.75rem);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 24px 60px -22px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
    min-height: 520px;
}
.addon-panel { display: none; }
.addon-panel.is-active { display: block; animation: addonFade 0.25s ease-out both; }
@keyframes addonFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.addon-panel__head { margin-bottom: 0.85rem; }
.addon-panel__head h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.addon-panel__head h4 i { color: #c9bbff; }

.addon-duration {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.addon-duration input[type="range"] { flex: 1; margin: 0; }
.addon-duration__value {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(159, 134, 255, 0.3);
    color: #d8ccff;
    font-size: 0.88rem;
    white-space: nowrap;
}

.addon-target {
    margin-top: 0.5rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.target-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    margin: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
    min-width: 0;
}
.target-pill:hover { border-color: rgba(159, 134, 255, 0.35); background: rgba(20, 14, 40, 0.7); }
.target-pill input { position: absolute; opacity: 0; pointer-events: none; }
.target-pill__check {
    width: 20px; height: 20px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex; align-items: center; justify-content: center;
    color: transparent;
    font-size: 0.65rem;
    flex-shrink: 0;
}
.target-pill input:checked ~ .target-pill__check {
    background: linear-gradient(135deg, #8b6dff, #6452a3);
    border-color: rgba(159, 134, 255, 0.55);
    color: #fff;
}
.target-pill__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.target-pill__name {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.target-pill__state {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.target-pill__state--active  { color: #6ee7a4; }
.target-pill__state--offline { color: rgba(255, 255, 255, 0.45); }
.target-pill__state--error   { color: #ff8aa7; }
.target-pill__state--new     { color: #92b4ff; }
.target-pill__state--sleep   { color: #c9bbff; }

.addon-preview {
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}
.addon-preview__label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.addon-preview__screen {
    min-height: 180px;
    padding: 1.75rem 1.25rem;
    background:
        radial-gradient(60% 70% at 50% 30%, rgba(139, 109, 255, 0.25), transparent 70%),
        rgba(5, 3, 15, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.addon-preview__msg {
    color: #fff;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.35;
    max-width: 100%;
    word-break: break-word;
}

/* Ticker (announcement marquee) — JS-driven rAF transforms. */
.addon-preview__screen--marquee {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    padding: 0;
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    overflow: hidden;
}
.addon-preview__screen--marquee::before,
.addon-preview__screen--marquee::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}
.addon-preview__screen--marquee::before { left: 0;  background: linear-gradient(90deg, rgba(5,3,15,1), transparent); }
.addon-preview__screen--marquee::after  { right: 0; background: linear-gradient(270deg, rgba(5,3,15,1), transparent); }

/* vanilla-marquee container */
.ann-marquee {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.ann-marquee__chunk {
    display: inline-block;
    color: #fff;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    padding: 0 2.5rem;
    text-shadow: 0 0 24px rgba(159, 134, 255, 0.4);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
/* The library wraps content in .js-marquee-wrapper / .js-marquee */
.ann-marquee .js-marquee-wrapper { display: flex; align-items: center; }
.ann-marquee .js-marquee { display: inline-flex; align-items: center; }

.quiz-preview { color: #fff; }
.quiz-preview__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}
.quiz-preview__time {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    color: #c9bbff;
    text-shadow: 0 0 24px rgba(159, 134, 255, 0.45);
}
.quiz-preview__audio {
    margin-top: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(110, 231, 164, 0.15);
    border: 1px solid rgba(110, 231, 164, 0.3);
    color: #6ee7a4;
    font-size: 0.8rem;
}
.quiz-preview__audio.is-muted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
}

/* ===== Device error rows (inside popup) ===== */
.err-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
}
.err-row {
    background: rgba(255, 95, 122, 0.08);
    border: 1px solid rgba(255, 95, 122, 0.25);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
}
.err-row__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.3rem;
}
.err-row__type {
    color: #ff8aa7;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.err-row__time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    margin-left: auto;
}
.err-row__clear {
    width: 30px; height: 30px;
    padding: 0 !important;
    min-width: 0 !important;
    font-size: 0.72rem;
}
.err-row__msg {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    word-break: break-word;
}
.err-row__src {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace;
}
.err-row__stack {
    margin-top: 0.4rem;
    font-size: 0.8rem;
}
.err-row__stack summary {
    cursor: pointer;
    color: #c9bbff;
    font-size: 0.8rem;
    padding: 0.2rem 0;
}
.err-row__stack pre {
    margin-top: 0.3rem;
    padding: 0.5rem 0.65rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    max-height: 200px;
    overflow: auto;
}

/* ===== Fire alarm test panel ===== */
.addons-nav__item--danger.is-active {
    background: linear-gradient(135deg, rgba(255, 95, 122, 0.25), rgba(192, 64, 90, 0.12));
    border-color: rgba(255, 95, 122, 0.45);
    box-shadow: 0 10px 24px -12px rgba(220, 60, 90, 0.5);
}
.addons-nav__icon--danger {
    background: rgba(255, 95, 122, 0.20) !important;
    border-color: rgba(255, 95, 122, 0.40) !important;
    color: #ff8aa7 !important;
}
.fire-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 95, 122, 0.10);
    border: 1px solid rgba(255, 95, 122, 0.35);
    border-radius: 12px;
    color: #ffc4cf;
    margin-bottom: 1rem;
}
.fire-banner > i {
    font-size: 1.15rem;
    color: #ff8aa7;
    margin-top: 0.15rem;
}
.fire-banner strong { color: #fff; font-size: 0.95rem; }
.fire-preview {
    background: radial-gradient(80% 100% at 50% 50%, rgba(255, 95, 122, 0.35), rgba(10, 4, 12, 0.95)) !important;
    position: relative;
    overflow: hidden;
    min-height: 320px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
}
.fire-preview__pulse {
    position: absolute;
    inset: 0;
    background: radial-gradient(50% 60% at 50% 50%, rgba(255, 95, 122, 0.5), transparent 70%);
    animation: firePulse 0.9s ease-in-out infinite;
    pointer-events: none;
}
@keyframes firePulse {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
}
/* Big blinking arrow */
.fire-preview__arrow {
    position: relative;
    width: clamp(140px, 28vw, 220px);
    height: clamp(140px, 28vw, 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 0 36px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 95, 122, 0.7);
    animation: fireArrowBlink 0.7s ease-in-out infinite;
    transform: rotate(45deg); /* default top-right */
    transform-origin: center;
    transition: transform 0.35s ease;
    will-change: transform, opacity;
}
.fire-preview__arrow i { font-size: clamp(4.5rem, 12vw, 8rem); }
@keyframes fireArrowBlink {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
    50%      { opacity: 0.35; filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.9)); }
}

.fire-preview__title {
    position: relative;
    color: #fff;
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-shadow: 0 0 24px rgba(255, 95, 122, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    animation: fireTextBlink 0.9s ease-in-out infinite;
}
@keyframes fireTextBlink {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.fire-preview__title i { color: #ffcb6b; animation: firePulse 0.7s ease-in-out infinite; }
.fire-preview__sub {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-align: center;
    width: 100%;
    letter-spacing: 0.02em;
}

/* 8-direction picker above the preview */
.fire-arrow-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}
.fire-arrow-opt {
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font-size: 0.78rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fire-arrow-opt:hover {
    background: rgba(255, 95, 122, 0.14);
    border-color: rgba(255, 95, 122, 0.35);
    color: #fff;
}
.fire-arrow-opt.is-active {
    background: linear-gradient(135deg, rgba(255, 95, 122, 0.35), rgba(192, 64, 90, 0.15));
    border-color: rgba(255, 95, 122, 0.55);
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(220, 60, 90, 0.5);
}

/* Status bar under the preview */
.fire-status {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
}
.fire-status__dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.fire-status[data-state="active"] {
    background: rgba(255, 95, 122, 0.12);
    border-color: rgba(255, 95, 122, 0.35);
    color: #ffc4cf;
}
.fire-status[data-state="active"] .fire-status__dot {
    background: #ff8aa7;
    box-shadow: 0 0 0 3px rgba(255, 95, 122, 0.25);
    animation: firePulse 0.9s ease-in-out infinite;
}

.quiz-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

/* ===== Devices page ===== */
.devices-page { color: #fff; }
.devices-summary {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.55rem 1rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.devices-summary__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6ee7a4;
    font-variant-numeric: tabular-nums;
}
.devices-summary__divider { color: rgba(255, 255, 255, 0.3); }
.devices-summary__total { color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.devices-summary__label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 0.3rem;
}

.device-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.95rem 1rem 0.9rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        0 14px 32px -18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
    color: #fff;
    overflow: hidden;
}
.device-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.6;
}
.device-card:hover {
    transform: translateY(-2px);
    border-color: rgba(159, 134, 255, 0.30);
    box-shadow:
        0 22px 42px -16px rgba(124, 92, 220, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.device-card--active  { color: #6ee7a4; border-color: rgba(86, 195, 130, 0.30); }
.device-card--offline { color: rgba(255, 255, 255, 0.3); }
.device-card--error   { color: #ff8aa7; border-color: rgba(255, 95, 122, 0.30); }
.device-card--new     { color: #92b4ff; border-color: rgba(124, 156, 255, 0.30); }
.device-card--sleep   { color: #c9bbff; border-color: rgba(159, 134, 255, 0.20); }

.device-card__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.device-card__pulse {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transform: scale(0.55);
    transform-origin: center;
}
.device-card__pulse .pulse-circle { margin: 0 !important; }

.device-card__id { flex: 1; min-width: 0; color: #fff; }
.device-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.device-card__state {
    color: currentColor;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.15rem;
    opacity: 0.9;
}
.device-card--offline .device-card__state { color: rgba(255, 255, 255, 0.45); }

.device-card__lock {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    flex-shrink: 0;
}

.device-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding: 0.5rem 0.7rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.device-card__meta > div {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    justify-content: space-between;
}
.device-card__meta dt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    flex-shrink: 0;
}
.device-card__meta dt i { color: rgba(201, 187, 255, 0.75); font-size: 0.7rem; }
.device-card__meta dd {
    color: #fff;
    font-size: 0.82rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.device-card__actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
    margin-top: auto;
}
.device-card__actions .watch-btn,
.device-card__actions .info-btn,
.device-card__actions .edit-btn,
.device-card__actions .power-btn {
    width: 100% !important;
    height: 32px !important;
    margin: 0 !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
}

/* ===== Team Access page (stats, toolbar, user cards) ===== */
.team-page { color: #fff; }

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        0 14px 32px -16px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
    height: 100%;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}
.stat-card__icon {
    width: 46px; height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.stat-card__icon--primary { background: rgba(139, 109, 255, 0.18); color: #c9bbff; border: 1px solid rgba(139, 109, 255, 0.3); }
.stat-card__icon--success { background: rgba(86, 195, 130, 0.18); color: #6ee7a4; border: 1px solid rgba(86, 195, 130, 0.3); }
.stat-card__icon--danger  { background: rgba(255, 95, 122, 0.18); color: #ff8aa7; border: 1px solid rgba(255, 95, 122, 0.3); }
.stat-card__icon--warning { background: rgba(255, 196, 84, 0.18); color: #ffcb6b; border: 1px solid rgba(255, 196, 84, 0.3); }
.stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-card__label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.team-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: inline-flex;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.filter-pill {
    padding: 0.4rem 0.95rem;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.filter-pill:hover { color: #fff; }
.filter-pill.is-active {
    background: linear-gradient(135deg, #8b6dff, #6452a3);
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(124, 92, 220, 0.6);
}

.user-grid__cell { display: flex; }

.member-card {
    position: relative;
    width: 100%;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 1rem 1.1rem 1.1rem;
    color: #fff;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        0 14px 32px -18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.member-card:hover {
    transform: translateY(-2px);
    border-color: rgba(159, 134, 255, 0.35);
    box-shadow:
        0 22px 42px -16px rgba(124, 92, 220, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.member-card__top {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.member-card__avatar {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}
.member-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: rgba(20, 14, 40, 0.7);
    border: 2px solid rgba(20, 14, 40, 0.95);
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}
.member-card__dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(20, 14, 40, 0.95);
    z-index: 2;
}
.member-card__dot--active  { background: #6ee7a4; box-shadow: 0 0 8px rgba(110, 231, 164, 0.6); }
.member-card__dot--blocked { background: #ff7a96; }

.member-card__identity {
    flex: 1;
    min-width: 0;
}
.member-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-card__handle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.15rem;
}

.member-card__menu { flex-shrink: 0; }
.member-card__email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.86rem;
    overflow: hidden;
}
.member-card__email i {
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    font-size: 0.78rem;
}
.member-card__email span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

@media (max-width: 480px) {
    .stat-card { padding: 0.85rem; }
    .stat-card__icon { width: 40px; height: 40px; }
    .stat-card__value { font-size: 1.2rem; }
    .filter-group { width: 100%; justify-content: space-between; }
    .filter-pill { flex: 1; padding: 0.4rem 0.5rem; font-size: 0.8rem; }
}

/* ===== Edit Content modal helpers ===== */
.content-preview {
    width: 100%;
    min-height: 200px;
    max-height: 360px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.content-preview img,
.content-preview video {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    display: block;
}
.mute-toggle {
    margin-top: 0.6rem;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.mute-toggle .form-check-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-bottom: 0;
    cursor: pointer;
}

/* ===== Reusable meta-grid (definition list) ===== */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.55rem;
    margin: 0;
    padding: 0;
}
.meta-grid__cell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
}
.meta-grid__cell dt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.25rem;
}
.meta-grid__cell dt i { color: #c9bbff; font-size: 0.78rem; }
.meta-grid__cell dd {
    color: #fff;
    font-size: 0.92rem;
    margin: 0;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}
.meta-grid__cell dd code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #c9bbff;
}

/* ===== Schedule modal (Power schedule + Edit playlist) ===== */
.sched-form,
.pl-form {
    text-align: left;
    color: #fff;
}
.sched-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}
.sched-section .form-label,
.pl-section .form-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.45rem;
}
.sched-section .form-control,
.pl-section .form-control { margin-bottom: 0; }

.sched-visibility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.sched-vis__title { font-weight: 600; color: #fff; font-size: 0.95rem; }
.sched-vis__desc  { color: rgba(255, 255, 255, 0.55); font-size: 0.8rem; }

.sched-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}
.sched-pill input { position: absolute; opacity: 0; pointer-events: none; }
.sched-pill__track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.sched-pill__knob {
    position: absolute;
    top: 50%;
    left: 2px;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.sched-pill input:checked ~ .sched-pill__track {
    background: linear-gradient(135deg, #8b6dff, #6452a3);
    border-color: rgba(159, 134, 255, 0.45);
}
.sched-pill input:checked ~ .sched-pill__track .sched-pill__knob,
.sched-pill input:checked + .sched-pill__track .sched-pill__knob {
    transform: translate(16px, -50%);
}
.sched-pill__label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Nearest exit compass grid ===== */
.sched-section--exit {
    border: 1px solid rgba(255, 95, 122, 0.25);
    background: linear-gradient(135deg, rgba(255, 95, 122, 0.08), rgba(255, 255, 255, 0.02));
}
.exit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.exit-tile {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font-size: 0.72rem;
    text-align: center;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, color 0.18s ease;
}
.exit-tile input { position: absolute; opacity: 0; pointer-events: none; }
.exit-tile:hover {
    background: rgba(139, 109, 255, 0.14);
    border-color: rgba(159, 134, 255, 0.4);
    color: #fff;
    transform: translateY(-1px);
}
.exit-tile input:checked ~ .exit-tile__arrow,
.exit-tile input:checked ~ .exit-tile__label { color: #fff; }
.exit-tile:has(input:checked),
.exit-tile.is-active {
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.3), rgba(100, 82, 163, 0.12));
    border-color: rgba(159, 134, 255, 0.55);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(124, 92, 220, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.exit-tile__arrow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(159, 134, 255, 0.30);
    color: #c9bbff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.exit-tile__arrow::before {
    content: "";
    display: block;
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 9px solid #c9bbff;
    transform-origin: center 70%;
}
/* Direction-specific rotations */
.exit-tile[data-exit-value="top"]          .exit-tile__arrow::before { transform: rotate(0deg); }
.exit-tile[data-exit-value="top-right"]    .exit-tile__arrow::before { transform: rotate(45deg); }
.exit-tile[data-exit-value="right"]        .exit-tile__arrow::before { transform: rotate(90deg); }
.exit-tile[data-exit-value="bottom-right"] .exit-tile__arrow::before { transform: rotate(135deg); }
.exit-tile[data-exit-value="bottom"]       .exit-tile__arrow::before { transform: rotate(180deg); }
.exit-tile[data-exit-value="bottom-left"]  .exit-tile__arrow::before { transform: rotate(225deg); }
.exit-tile[data-exit-value="left"]         .exit-tile__arrow::before { transform: rotate(270deg); }
.exit-tile[data-exit-value="top-left"]     .exit-tile__arrow::before { transform: rotate(315deg); }
.exit-tile__label { font-weight: 500; letter-spacing: 0.04em; }

.sched-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}
.sched-preset {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.sched-preset:hover {
    background: rgba(139, 109, 255, 0.18);
    border-color: rgba(159, 134, 255, 0.45);
    color: #fff;
}
.sched-preset i { color: #c9bbff; font-size: 0.8rem; }

.sched-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.sched-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    opacity: 0.55;
}
.sched-row.is-enabled {
    opacity: 1;
    border-color: rgba(159, 134, 255, 0.35);
    background: rgba(20, 14, 40, 0.55);
}
.sched-row__day {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
}
.sched-row__day .form-check-input { margin: 0; }
.sched-row__times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}
.sched-time { display: flex; align-items: center; gap: 0.35rem; }
.sched-time__label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.sched-time-input {
    height: 32px !important;
    padding: 0 0.5rem !important;
    margin: 0 !important;
    font-size: 0.82rem !important;
    color-scheme: dark;
    min-width: 0;
    flex: 1;
}

/* ===== Playlist edit color picker ===== */
.pl-color-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.85rem;
}
.pl-color-preview {
    height: 110px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.25), 0 6px 20px -8px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.4rem;
    transition: background 0.2s ease;
}
.pl-color-preview__chip {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.pl-color-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.swatches {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.4rem;
}
.swatch {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--swatch);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, border-color 0.18s ease;
}
.swatch:hover { transform: scale(1.06); }
.swatch.is-active {
    border-color: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.18);
}
.custom-color-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    cursor: pointer;
    align-self: flex-start;
    margin: 0;
}
.custom-color-trigger:hover { background: rgba(139, 109, 255, 0.16); border-color: rgba(159, 134, 255, 0.4); }
.custom-color-trigger i { color: #c9bbff; }
.custom-color-trigger input[type="color"] {
    width: 0; height: 0; opacity: 0; border: none; padding: 0; margin: 0; pointer-events: auto;
}

.pl-toggles { display: flex; flex-direction: column; gap: 0.5rem; }
.pl-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
}
.pl-toggle i { color: rgba(255, 255, 255, 0.55); margin-right: 0.4rem; }

@media (max-width: 480px) {
    .pl-color-row { grid-template-columns: 1fr; }
    .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .sched-row { grid-template-columns: 1fr; }
    .sched-row__times { grid-template-columns: 1fr 1fr; }
}

/* ===== Device info modal ===== */
.device-info { text-align: left; color: #fff; }
.device-info__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0.85rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem;
}
.device-info__icon {
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.25), rgba(100, 82, 163, 0.10));
    border: 1px solid rgba(139, 109, 255, 0.30);
    color: #c9bbff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.device-info__name { font-weight: 600; font-size: 1.05rem; color: #fff; }
.device-info__sub  { margin-top: 0.2rem; }

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    width: 26px; height: 26px;
    border-radius: 7px;
    cursor: pointer;
    margin-left: 0.4rem;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-size: 0.72rem;
}
.copy-btn:hover { background: rgba(139, 109, 255, 0.18); color: #c9bbff; border-color: rgba(159, 134, 255, 0.4); }
.copy-btn.is-copied { background: rgba(86, 195, 130, 0.18); color: #6ee7a4; border-color: rgba(86, 195, 130, 0.4); }
.meta-grid__cell dd {
    display: inline-flex;
    align-items: center;
    width: 100%;
}
.meta-grid__cell dd > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.license-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.license-row i { color: #c9bbff; }
.license-row code {
    flex: 1;
    font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make sure native time inputs render dark scheme */
input[type="time"] { color-scheme: dark; }

/* ===== Right-click context menu ===== */
.ctx-menu {
    position: absolute;
    z-index: 99999;
    min-width: 200px;
    padding: 0.4rem;
    background: rgba(20, 14, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.65);
    color: #fff;
    animation: ctxFadeIn 0.16s ease-out both;
}
@keyframes ctxFadeIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ctx-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ctx-menu__list li,
#contextMenuList li,
#contextMenuList .ctx-action {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    background: transparent !important;
    border: none !important;
}
#contextMenuList li:hover,
#contextMenuList .ctx-action:hover {
    background: rgba(139, 109, 255, 0.18) !important;
    color: #fff !important;
}
#contextMenuList li.ctx-divider,
#contextMenuList hr {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.3rem 0;
    padding: 0;
    cursor: default;
    list-style: none;
    border: none;
}
#contextMenuList li.ctx-danger,
#contextMenuList .ctx-action.ctx-danger { color: #ff8aa7; }
#contextMenuList li.ctx-danger:hover,
#contextMenuList .ctx-action.ctx-danger:hover {
    background: rgba(255, 100, 130, 0.18) !important;
    color: #ff8aa7 !important;
}
#contextMenuList li i,
#contextMenuList .ctx-action i {
    width: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

/* ===== Account / profile page hero ===== */
.account-page { color: #fff; }

.account-hero {
    position: relative;
    margin-bottom: 1.25rem;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 24px 60px -22px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    background: rgba(15, 10, 30, 0.55);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}
.account-hero__banner {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: rgba(40, 28, 78, 0.5);
    position: relative;
}
.account-hero__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15, 10, 30, 0.85) 100%);
}
.account-hero__body {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    padding: 0 1.5rem 1.5rem;
    margin-top: -64px;
    z-index: 2;
    flex-wrap: wrap;
}
.account-hero__avatar {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid rgba(20, 14, 40, 0.95);
    overflow: hidden;
    background: rgba(20, 14, 40, 0.95);
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
}
.account-hero__avatar:hover { transform: scale(1.02); }
.account-hero__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-hero__avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 10, 30, 0.55);
    color: #fff;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.account-hero__avatar:hover .account-hero__avatar-overlay { opacity: 1; }

.account-hero__meta {
    flex: 1;
    min-width: 240px;
    padding-bottom: 0.5rem;
}
.account-hero__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}
.account-hero__name .badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
}
.info-chip--accent {
    background: rgba(139, 109, 255, 0.18) !important;
    border-color: rgba(139, 109, 255, 0.35) !important;
    color: #d8ccff !important;
}
.info-chip--accent i { color: #c9bbff !important; }
.account-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
}
.info-chip i {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
}

/* ===== Team list (account page) ===== */
.team-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 420px;
    overflow-y: auto;
}
.team-list::-webkit-scrollbar { width: 4px; }
.team-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
.team-list__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.team-list__item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}
.team-list__avatar {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.team-list__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: rgba(20, 14, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.team-list__dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(20, 14, 40, 0.95);
    z-index: 2;
}
.team-list__dot--online  { background: #6ee7a4; box-shadow: 0 0 8px rgba(110, 231, 164, 0.6); }
.team-list__dot--idle    { background: #ffcb6b; }
.team-list__dot--offline { background: rgba(255, 255, 255, 0.2); }

.team-list__meta { flex: 1; min-width: 0; }
.team-list__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-list__role {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}
.team-list__status {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 600px) {
    .account-hero__body {
        flex-direction: column;
        align-items: flex-start;
        margin-top: -56px;
    }
    .account-hero__avatar { width: 110px; height: 110px; }
}

/* ===== Roles: ability pills + groups ===== */
.ability-search {
    position: relative;
    width: 240px;
    max-width: 100%;
}
.ability-search i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}
.ability-search input {
    width: 100%;
    height: 38px;
    padding: 0 0.85rem 0 2.25rem;
    margin: 0;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;
    color: #fff;
    font-size: 0.88rem;
}
.ability-search input::placeholder { color: rgba(255, 255, 255, 0.4); }

.ability-groups {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.ability-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.95rem 1rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.ability-group.is-active {
    border-color: rgba(159, 134, 255, 0.30);
    background: rgba(20, 14, 40, 0.5);
}
.ability-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.ability-group__title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}
.ability-group__title i { color: #c9bbff; font-size: 0.9rem; }
.ability-group__count {
    margin-left: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(139, 109, 255, 0.16);
    color: #c9bbff;
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ability-group__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    cursor: pointer;
    margin: 0;
}
.ability-group__toggle .form-check-input { margin: 0; }

.ability-group__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.5rem;
}

.ability-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    background: rgba(15, 10, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    margin: 0;
}
.ability-pill:hover {
    border-color: rgba(159, 134, 255, 0.35);
    background: rgba(20, 14, 40, 0.7);
}
.ability-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ability-pill__check {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ability-pill__label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.3;
}
.ability-pill input:checked ~ .ability-pill__check {
    background: linear-gradient(135deg, #8b6dff, #6452a3);
    border-color: rgba(159, 134, 255, 0.6);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(124, 92, 220, 0.18);
}
.ability-pill input:checked ~ .ability-pill__label { color: #fff; }
.ability-pill input:focus-visible ~ .ability-pill__check {
    box-shadow: 0 0 0 3px rgba(124, 92, 220, 0.35);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.5);
}
.empty-state i { font-size: 1.6rem; }

/* ===== History page polish ===== */
.history-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.log-entry {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.95rem !important;
}
.log-entry .log-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(139, 109, 255, 0.18);
    border: 1px solid rgba(139, 109, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c9bbff;
    font-size: 0.85rem;
}
.log-entry .log-action { order: 2; flex: 1; min-width: 0; }
.log-entry .log-time {
    order: 3;
    margin: 0 !important;
    text-align: right;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.78rem;
    white-space: nowrap;
}

.role-icon {
    display: inline-flex;
    width: 34px; height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(139, 109, 255, 0.25), rgba(100, 82, 163, 0.10));
    border: 1px solid rgba(139, 109, 255, 0.25);
    color: #c9bbff;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.role-ability-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
}
.role-ability-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.role-ability-list li i {
    color: #6ee7a4;
    font-size: 0.78rem;
}

.row-action-toggle {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.row-action-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ===== Reset white text inside cards/tables/modals — undo legacy "color: black" ===== */
.modal-body .form-label,
.modal-body label,
.card label,
.card .form-label,
.section label,
.section .form-label { color: rgba(255, 255, 255, 0.78); }

/* ===== Build/version badge (bottom-right, tiny) ===== */
.build-badge {
    position: fixed;
    right: 8px;
    bottom: 6px;
    z-index: 2147483645;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(20, 14, 40, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    pointer-events: auto;
    user-select: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.build-badge:hover { opacity: 1; color: #c9bbff; }
@media (max-width: 480px) {
    .build-badge { font-size: 9px; padding: 2px 6px; right: 6px; bottom: 4px; }
}
