@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  /* --------------------------
     10% — ACCENT COLORS
  ---------------------------*/
  --acc1: #4C44B6;  /* brand purple */
  --acc2: #3AB9C8;  /* brand teal */

  /* --------------------------
     60% — FOUNDATION NEUTRALS
     These create the visual universe.
  ---------------------------*/
  --neutral-0: #F7F7FA; /* soft near-white */
  --neutral-1: #EFEFF5; /* light lavender-grey */
  --neutral-2: #D7D7E5; /* subtle cool grey */
  --neutral-3: #A9A9B8; /* text-muted */

  /* --------------------------
     30% — PRIMARY SURFACES
     These subtly reference purple WITHOUT being purple.
     Canonical surfaces.
  ---------------------------*/
  --surface-0: #FFFFFF; /* base canvas — clean card white */
  --surface-1: #F2F1FC; /* cards, navs — very subtle purple-tint */
  --surface-2: #E8E7F7; /* raised, grouped — slightly deeper tint */

  /* --------------------------
     TEXT SYSTEM
  ---------------------------*/
  --text-main: #1E1E24;
  --text-mid: #5A5A65;
  --text-invert: #FFFFFF;

  /* --------------------------
     FEEDBACK COLORS
     (harmonized to brand ecosystem)
  ---------------------------*/
  --success: #70C9A6;  /* green leaning teal */
  --warning: #F4B48C;  /* soft orange */
  --error:   #D27A90;  /* berry red, matches purple family */
  --info:    #7ECFE2;  /* softened teal blue */

  /* --------------------------
     BORDERS & SHADOWS
  ---------------------------*/
  --border: #D9D9E5;
  --border-soft: #EFEFF5;
  --border-strong: #BFC0CE;
  
  --shadow-1: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-2: 0 8px 35px rgba(0,0,0,0.10);

  --radius: 12px;
}
[data-theme="dark"] {
  /* --------------------------
     10% — ACCENT COLORS (unchanged)
  ---------------------------*/
  --acc1: #756dff;  /* elevated purple for dark mode glow */
  --acc2: #4ad2e0;  /* brighter teal for dark backgrounds */

  /* --------------------------
     60% — FOUNDATION NEUTRALS
     Deep, breathable, ultra-smooth darks.
  ---------------------------*/
  --neutral-0: #111218; /* main background — soft charcoal violet */
  --neutral-1: #1A1B22; /* elevated layer */
  --neutral-2: #262732; /* mid layer */
  --neutral-3: #6C6D78; /* muted text */

  /* --------------------------
     30% — PRIMARY SURFACES
     Surfaces with subtle purple-tone atmospherics.
  ---------------------------*/
  --surface-0: #181923; /* card surface */
  --surface-1: #20212D; /* slight purple haze */
  --surface-2: #2A2B39; /* stronger tint but still neutral */

  /* --------------------------
     TEXT SYSTEM
  ---------------------------*/
  --text-main: #E8E9F4;   /* high contrast but not pure white */
  --text-mid:  #A8A9B4;   /* secondary text */
  --text-invert: #000000; /* used on bright accent buttons */

  /* --------------------------
     FEEDBACK COLORS
     Same hues, adjusted for visibility in dark.
  ---------------------------*/
  --success: #69c9a0;  /* slightly brighter */
  --warning: #f3a971;  /* richer warm accent */
  --error:   #e27a98;  /* berry red glowing */
  --info:    #7fdcf2;  /* smooth teal-blue pop */

  /* --------------------------
     BORDERS & SHADOWS
     Dark mode borders must be soft, not harsh.
  ---------------------------*/
  --border: #2F303A;          /* subtle */
  --border-soft: #22232a;
  --border-strong: #434454;   /* stronger for dividers */

  --shadow-1: 0 4px 20px rgba(0,0,0,0.45);
  --shadow-2: 0 8px 35px rgba(0,0,0,0.55);

  --radius: 12px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body {
    background: var(--neutral-0);
    color: var(--text-main);
    min-width: 300px;
}

.lab-shell {
    width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
}
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
}
.box {
    background: var(--surface-0);
    display: flex;
    flex-direction: column;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}



input:not([type="checkbox"]),
select,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input,
select,
textarea,
input:is(:-webkit-autofill, :autofill) {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-0);
  color: var(--text-main);
  font-size: 0.95rem;
  box-sizing: border-box;
}

input:hover,
select:hover,
textarea:hover {
  outline: none;
  border-color: var(--acc1);;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--acc1);
}


input::placeholder,
textarea::placeholder {
  color: var(--text-mid);
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    /* Use an inset box shadow to cover the browser's default color */
    -webkit-box-shadow: 0 0 0 1000px var(--surface-0) inset !important;
    
    /* This overrides the text color */
    -webkit-text-fill-color: var(--text-main) !important;
    
    /* Ensures the transition doesn't "flicker" back to yellow on load */
    transition: background-color 5000s ease-in-out 0s;
}


.form-box {
    width: 450px;
    margin: 0px 10px;
}
.form-box header {
    font-size: 1.5rem;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.form-box form .field {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}
.form-box form .input input {
    height: 40px;
    width: 100%;
    font-size: 1rem;
    padding: 0 10px;
    border-radius: 5px;
    border: 1px solid var(--border-strong);
    background-color: var(--surface-0);
    color: var(--text-main);
    transition: all .25s ease;
}
.form-box form .input input:focus {
    border-color: var(--acc1);
    outline: none;
}

.form-box form .input input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    cursor: pointer;
    accent-color: var(--acc1);
}
.form-box form .input input[type="checkbox"]:checked {
    background-color: var(--acc1);
    border-color: var(--acc1);
}
.form-box .input input.readonly {
    background-color: var(--surface-1);
    cursor: not-allowed;
}

.submit {
    width: 100%;
}
.link.forgot-password {
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--acc1);
}
.link.forgot-password:hover {
    text-decoration: underline;
}
.input:has(.link.forgot-password) {
    position: relative;
}
.input:has(.link.forgot-password) .link.forgot-password {
    position: absolute;
    right: 0;
}
.links {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.links a {
    color: var(--acc1);
    text-decoration: none;
}
.links a:hover {
    text-decoration: underline;
}
.message {
    text-align: center;
    background-color: var(--surface-0);
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    margin-bottom: 10px;
}
.message.error {
    border: 1px solid var(--error);
    background: var(--surface-0);
    color: var(--error);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}
.message.success {
    border: 1px solid var(--success);
    background: var(--surface-0);
    color: var(--success);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}
.message.info {
    border: 1px solid var(--info);
    background: var(--surface-0);
    color: var(--info);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}
.message.warning {
    border: 1px solid var(--warning);
    background: var(--surface-0);
    color: var(--warning);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}






/********* BUTTONS ********/

.btn {
    height: 35px;
    background: var(--acc1);
    border: 0;
    border-radius: 5px;
    color: var(--text-invert);
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
    margin-top: 10px;
    padding: 6px 12px;
    text-decoration: none;
    text-align: center;
}
.btn:hover {
    opacity: 0.82;
    filter: saturate(120%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}
.btn:active {
    box-shadow: inset var(--shadow-1);
}
.btn-sm {
  padding: 4px 8px;
  font-size: 0.65rem;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  transition: all .2s;

  min-width: 70px;
}
.btn-sm:hover {
    opacity: 0.82;
    filter: saturate(120%);
    transform: translateY(-2px);
}
.btn-sm:active {
    box-shadow: inset var(--shadow-1);
}

.btn.ghost {
  background: transparent;
  color: var(--acc1);
  border: 1px solid var(--border);
}
.btn-info {
  background: var(--info);
  color: var(--text-invert);
  border: 1px solid var(--info);
}
.btn-success {
  background: var(--success);
  color: var(--text-invert);
  border: 1px solid var(--success);
}
.btn-success:disabled {
    opacity: 1;
    cursor: default;
}
.btn-warning {
  background: var(--warning);
  color: var(--text-invert);
  border: 1px solid var(--warning);
}
.btn-error {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}
.btn-disabled {
  background: var(--surface-1);
  color: var(--text-mid);
  border: 1px solid var(--border);
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-clear {
  background: transparent;
  color: var(--acc1);
  border: 1px solid var(--border-strong);
}

.link-btn {
    color: var(--acc);
    background-color: var(--surface-1);
    margin: 0;
    padding: 10px;
    min-height: max-content;
    width: 100%;
}
.link-btn > img {
    width: 50px;
}






.card {
    width: 100%;
    background: var(--surface-0);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    gap: 22px;
    border: 1px solid var(--border-soft);
    position: relative;
    transition: all .25s ease;
}
.card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
}
















/* --- HEADER --- */
.header {
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 clamp(16px, 4vw, 32px);
  height: 48px;
  position: relative;

  border-bottom: 1px solid var(--border-soft);

  z-index: 100;
}

.header p {
  margin: 0;
}

/* Logo */
.logo a {
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-main);
}
.logo a:hover {
  color: var(--acc1);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}


/* === Theme Toggle === */
.theme-toggle {
  all: unset;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: space-between;
  gap: 8px;
  cursor: pointer;
}

.theme-toggle input {
  display: none;
}

.switch {
  position: relative;
  width: 40px;
  height: 20px;
  background: var(--surface-1);       /* subtle surface as base */
  border-radius: 30px;
  border: 1px solid var(--border-soft);    /* system border */
  transition: all 0.3s ease;
}

.switch::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-0);       /* small knob uses main surface */
  box-shadow: var(--shadow-1);        /* light shadow for depth */
  transition: all 0.3s ease;
}

/* Checked / dark mode */
input:checked + .switch {
  background: var(--neutral-2);        /* slightly darker surface for dark mode */
}

input:checked + .switch::before {
  transform: translateX(20px);
  background: var(--acc1);             /* knob highlights brand purple in dark mode */
  box-shadow: 0 0 8px rgba(76,68,182,0.3), 0 0 12px rgba(58,185,200,0.15); /* subtle glow */
}



.profile-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

label.profile-card {
  margin: 0 !important;
  font-weight: unset !important;
  position: absolute;
  right: 0;
  z-index: 100;

  transform-origin: top right;
  transform: scale(0.98);
  opacity: 0.95;

  display: flex;
  flex-direction: column;

  background: var(--surface-1);
  border: 1px solid transparent;
  border-radius: 12px;

  padding: 6px 10px;
  margin: 0;
  min-width: 140px;

  cursor: pointer;
  box-shadow: none;
  transition: all 0.2s ease;
}

.profile-card:hover {
  box-shadow: var(--shadow-1);
}

.profile-toggle:checked + .profile-card {
  transform: scale(1);
  opacity: 1;

  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);

  z-index: 200;
}


.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;

  display: grid;
  place-items: center;

  background: var(--surface-2);
  font-size: 0.9rem;
}

.profile-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;

  transition:
    max-height 0.35s cubic-bezier(.4,0,.2,1),
    opacity 0.25s ease;
}

.profile-toggle:checked + .profile-card .profile-body {
  max-height: 240px;
  opacity: 1;
}

.profile-meta {
  font-size: 0.75rem;
  color: var(--text-mid);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.profile-actions a,
.profile-actions button {
  all: unset;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main);
}

.profile-actions a:hover,
.profile-actions button:hover {
  color: var(--acc1);
}

.profile-actions .logout {
  color: var(--danger);
}

.profile-wrap {
  position: relative;
  top: -40%;
}























main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
    min-width: 320px;
    height: 100%;
}
.main-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: clamp(300px, 80%, 900px);
    gap: 20px;
}
.main-box .top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.main-box .bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}
@media (max-width: 768px) {
    .main-box .bottom {
        flex-direction: column;
    }
}

.main-box .bottom .section {
    width: 100%;
    background: var(--surface-0);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    border: 1px solid var(--border-soft);
    position: relative;
    transition: all .25s ease;
}
.main-box .bottom .section:hover {
    border-color: var(--border);
}





/* ==== WELCOME CARD WITH PULSE ==== */

.welcome-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    overflow: hidden;
    position: relative;
    transition: all .25s ease;
}


/* Header */
.welcome-head h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}
.welcome-head h2 span {
    color: var(--acc1);
}
.user-email {
    font-size: 0.95rem;
    color: var(--text-mid);
}
.workspace-meta {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-mid);
}

/* Body */
.welcome-body .tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}
.welcome-body .sub {
    font-size: 0.95rem;
    color: var(--text-mid);
    margin-top: 4px;
}

/* ==== ANIMATED LOADING PULSE LINE ==== */
.pulse-line.loading {
    position: relative;
    height: 3px;
    background: rgba(76, 68, 182, 0.15); /* soft version of accent */
    overflow: hidden;
    border-radius: 2px;
}

.pulse-line.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: -20%;
    width: 40%;
    height: 3px;
    background: var(--acc1);
    animation: loadingPulse 1.8s infinite ease-in-out;
    border-radius: inherit;
}

@keyframes loadingPulse {
    0% {
        left: -30%;
        opacity: 0.4;
    }
    50% {
        left: 50%;
        opacity: 1;
    }
    100% {
        left: 130%;
        opacity: 0.4;
    }
}

/* ==== BROKESELLERS BREATHING DRIFT PULSE ==== */
.pulse-line.bsl {
    position: relative;
    height: 3px;
    border-radius: 3px;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        rgba(76, 68, 182, 0.05),
        rgba(0, 178, 170, 0.08),
        rgba(76, 68, 182, 0.05)
    );
}

/* Full-width glow that moves smoothly */
.pulse-line.bsl::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;

    /* Span entire line so it never "dies" early */
    width: 100%;

    /* glowing core (centered) */
    background: radial-gradient(
        circle at 50% 50%,
        rgba(76, 68, 182, 0.55) 0%,
        rgba(76, 68, 182, 0.25) 35%,
        rgba(0, 178, 170, 0.20) 60%,
        transparent 100%
    );

    opacity: 0;
    transform: translateX(-100%); /* start fully off-screen on left */
    animation: bslGlowFull 15s ease-in-out infinite;
}

@keyframes bslGlowFull {
    0% {
        opacity: 0;
        transform: translateX(-100%) scale(0.8);
    }
    40% {
        opacity: 0.45;
        transform: translateX(0%) scale(1.1); /* centered */
    }
    80% {
        opacity: 0.15;
        transform: translateX(100%) scale(0.9); /* end right */
    }
    100% {
        opacity: 0;
        transform: translateX(-100%) scale(0.8); /* reset */
    }
}


/* ==== BSL BORDER ==== */
@property --angle {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}

.bsl-border {
    position: relative;
    background: var(--surface-0); /* inner content */
    overflow: hidden;
}

/* pseudo-element as border */
.bsl-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    padding: 3px; /* border thickness */
    border-radius: 18px;
    background: conic-gradient(
        from var(--angle),
        rgba(76, 68, 182, 0.1),
        rgba(76, 68, 182, 0.2),
        rgba(76, 68, 182, 0.1)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;

    animation: rotateConic 15s linear infinite;
}

/* Animate the custom property --angle */
@keyframes rotateConic {
    to {
        --angle: 360deg;
    }
}


/* Mobile */
@media (max-width: 840px) {
    .welcome-card.pulse {
        padding: 24px;
    }
    .welcome-head h2 {
        font-size: 1.45rem;
    }
}








/* ==== DASHBOARD ==== */

/* ==== USER MANAGEMENT SECTION (ADMIN) ==== */

.user-shell {
    border-top: 1px solid var(--border-soft);
    margin-top: 12px;
    padding-top: 16px;
    max-height: 500px;
    overflow-y: auto;
    /* Clean scrollbar for modern browsers */
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-2) transparent;
}

.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
}

/* The User Card */
.user-card {
    background: var(--surface-1); /* Subtle purple-tint surface */
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.user-card:hover {
    background: var(--surface-2); /* Raise on hover */
    border-color: var(--acc1);
    box-shadow: var(--shadow-1);
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details strong {
    color: var(--text-main);
    font-size: 0.9rem;
}

/* Status Tags using Root Feedback Variables */
.status-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active { color: var(--success); }
.status-pending { color: var(--warning); }
.status-suspended { color: var(--error); }
.status-admin { color: var(--acc2); } /* Teal for admin roles */

/* Action Buttons */
.user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}










/* Styles for invitaion container */
.invitation-shell {
    border-top: 1px solid var(--border-soft);
    margin-top: 12px;
    padding-top: 16px;
    max-height: 500px;
    overflow-y: auto;
    /* Clean scrollbar for modern browsers */
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-2) transparent;
}

.invitation-alerts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
}



.invite-warning {
  border-color: var(--warning);
  background: var(--surface-1);
}



.invite-card {
    background: var(--surface-1); /* Subtle purple-tint surface */
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;

    min-height: 100px;
}

.invite-card:hover {
    background: var(--surface-2); /* Raise on hover */
    border-color: var(--acc1);
    box-shadow: var(--shadow-1);
}


.invite-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.org-logo {
    width: 40px;
    height: 40px;
    background: transparent;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.org-logo .placeholder {
    width: 40px;
    height: 40px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.invite-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-main);
}

.invite-text span {
  color: var(--text-mid);
}

.invite-meta {
  font-size: 0.75rem;
  color: var(--text-mid);
}

.invite-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border-soft);
    padding-top: 12px;
}











/* Styles for app cards */
.app-shell {
    border-top: 1px solid var(--border-soft);
    margin-top: 12px;
    padding-top: 16px;
    max-height: 500px;
    overflow-y: auto;
    /* Clean scrollbar for modern browsers */
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-2) transparent;
}
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
}

.app-card {
    background: var(--surface-1); /* Subtle purple-tint surface */
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.app-card:hover {
  background: var(--surface-2);
  border-color: var(--acc1);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;

  padding: 6px;

  background: var(--surface-0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.app-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.app-key {
  font-size: 0.75rem;
  color: var(--text-mid);
}

.status-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.st-active {
  background: rgba(112, 201, 166, 0.15);
  color: var(--success);
}

.st-none {
  background: rgba(244, 180, 140, 0.15);
  color: var(--warning);
}

.app-desc {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.45;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-row {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-row .btn {
  flex: 1;
  min-width: 110px;
}

.btn-launch { background: var(--acc1); }
.btn-sub{ background: var(--success); }
.btn-unsub { background: var(--error); }
.btn-trial { background: var(--info); }






.welcome-head {
    position: relative;
}

/* Theme Toggle */
.toggle {
    position: absolute;
    top: -30px;
    right: -20px;
}
/* === Toggle === */
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 8px;
}

.toggle input {
  display: none;
}

.switch {
  position: relative;
  width: 40px;
  height: 20px;
  background: var(--surface-1);       /* subtle surface as base */
  border-radius: 30px;
  border: 1px solid var(--border-soft);    /* system border */
  transition: all 0.3s ease;
}

.switch::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-0);       /* small knob uses main surface */
  box-shadow: var(--shadow-1);        /* light shadow for depth */
  transition: all 0.3s ease;
}

/* Checked / dark mode */
input:checked + .switch {
  background: var(--neutral-2);        /* slightly darker surface for dark mode */
}

input:checked + .switch::before {
  transform: translateX(20px);
  background: var(--acc1);             /* knob highlights brand purple in dark mode */
  box-shadow: 0 0 8px rgba(76,68,182,0.3), 0 0 12px rgba(58,185,200,0.15); /* subtle glow */
}













/* --- Validation & Feedback Styles --- */

/* Style for the list of password requirements */
.validation-list {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Style for list items that are yet to be typed/checked (Muted) */
.validation-list li {
    /* Base style for all list items */
    color: var(--neutral-3); /* Muted grey */
    list-style: none; 
    font-size: 0.9em;
    padding: 3px 0; /* Add padding for readability */
}

/* Style for required/error field highlighting */
.input input:focus {
    box-shadow: 0 0 0 1px var(--acc1);
    border-color: var(--acc1); 
    outline: none;
}

/* The class we add via JavaScript for required field highlighting */
.input.error input {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 1px var(--error);
}

/* Update visual states */
.validation-list li.valid {
    color: var(--success);
}
.validation-list li.invalid {
    color: var(--error);
}







/* === Footer === */
/* Sticks at bottom of page */
footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-mid);
  z-index: 999;
}
