@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: hsl(235, 10%, 15%);
  --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: 100vh;
    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);
}
.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);
    accent-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;
}
.success {
    border-color: var(--success);
    color: var(--success) !important;
}
.warning {
    border-color: var(--warning);
    color: var(--warning) !important;
}

/********* Home ********/



.btn {
    height: 35px;
    background: var(--acc1);
    border: 0;
    border-radius: 5px;
    color: var(--text-invert);
    font-size: 1rem;
    cursor: pointer;
    transition: all .3s;
    margin-top: 10px;
    padding: 6px 12px;
    text-decoration: none;
    text-align: center;

}
.btn.ghost {
  background: transparent;
  color: var(--acc1);
  border: 1px solid var(--border);
}
.btn:hover {
    opacity: 0.82;
    filter: saturate(120%);
}
.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;
}



.header {
    background: var(--neutral-1);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    line-height: 60px;
    z-index: 100;

    min-width: 320px;
}
.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
}
.logo a:hover {
    color: var(--acc1);
    cursor: pointer;
    filter: saturate(120deg);
}
.right-links a {
    text-decoration: none;
    color: var(--text-main);
    padding: 0 10px;
}
.right-links a:hover {
    color: var(--acc1);
    cursor: pointer;
    filter: saturate(120deg);
}

main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    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%;
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    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 ==== */

.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);
}
.welcome-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    position: relative;
    transition: all .25s ease;
}

.welcome-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
}

/* 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);
}

/* 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 ==== */

/* Styles for invitaion container */
.invitation-shell {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px;
  margin-top: 8px;
  margin-bottom: 16px;
  overflow-y: auto;
    /* Hide scrollbars */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.invitation-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;

  max-height: 400px;

  align-items: start;
  grid-auto-rows: min-content;
}

/* Hide scrollbar */
.invitation-shell::-webkit-scrollbar,
.invitation-alerts::-webkit-scrollbar {
  display: none;
}


.invite-warning {
  border-color: var(--warning);
  background: var(--surface-1);
}



.invite-card {
  background: var(--surface-0);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);

  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s;

  /* Unfiform Height for all cards*/
  height: 100%;
  justify-content: space-between;
}

.invite-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}


.invite-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.org-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;

  border-radius: 8px;
  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;
}

.org-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.org-logo.placeholder {
  font-size: 18px;
}

.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: 10px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.65rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: all .3s;
}
.btn-sm:hover {
    opacity: 0.82;
    filter: saturate(120%);
    transform: translateY(-2px);
}


/* Accept */
.btn-accept {
  background: var(--success);
  color: var(--text-invert);
  border: 1px solid var(--success);
}

/* Reject */
.btn-reject {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}

















/* Styles for app cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  align-items: stretch;
  justify-items: start;
  margin-bottom: 16px;
  margin-top: 8px;

  border-top: 1px solid var(--border-soft);
  padding-top: 16px;

  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 16px;
}

.app-card {
  background: var(--surface-0);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);

  max-width: clamp(300px, 100%, 400px);

  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  transition: box-shadow .25s ease, transform .2s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.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, .btn-cancel, .btn-close, .btn-delete{ 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 */
}




/* === 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;
}









/* --- 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);
}







