:root {
    --font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --bg-main: #f2f4f8;
    --bg-card: #ffffff;
    --bg-card-strong: #ffffff;
    --text-primary: #111322;
    --text-muted: rgba(17, 19, 34, 0.7);
    --border-subtle: rgba(17, 19, 34, 0.08);
    --accent-one: #7c83ff;
    --accent-two: #4fc3f7;
    --shadow-strong: 0 20px 45px rgba(15, 23, 42, 0.12);
    --glass-panel: rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-main: #f2f4f8;
        --bg-card: #ffffff;
        --bg-card-strong: #ffffff;
        --text-primary: #111322;
        --text-muted: rgba(17, 19, 34, 0.7);
        --border-subtle: rgba(17, 19, 34, 0.08);
        --glass-panel: rgba(17, 19, 34, 0.08);
        --shadow-strong: 0 20px 45px rgba(15, 23, 42, 0.12);
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-primary);
}

.bulma-section {
    padding: 0 !important;
    margin-left:0 !important;
}

a {
    color: inherit;
}

.page-gradient {
    min-height: 100vh;
    background: var(--bg-main);
}

.hero-shell,
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.dashboard-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 0 2.5rem;
}

.hero-card,
.auth-card,
.welcome-card {
    /* background: var(--bg-card);
    box-shadow: var(--shadow-strong);
    border-radius: 28px; */
    /* padding: clamp(1rem, 1.5vw, 1.75rem); */
}

.welcome-card p {
    margin-bottom: 2rem;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cta-group--align-start {
    justify-content: flex-start;
}

.cta-group--align-end {
    justify-content: flex-end;
}

.cta-group--gap-tight {
    gap: 0.5rem;
}

.cta-group--gap-snug {
    gap: 0.75rem;
}

.cta-group--mt-sm {
    margin-top: 0.75rem;
}

.cta-group--mt-md {
    margin-top: 1rem;
}

.maintenance-banner {
    width: 100%;
    text-align: center;
    padding: 0.4rem 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    display: flex;
    justify-content: center;
}

.maintenance-banner.bulma-notification {
    border-radius: 0;
    margin: 0;
    background: #ffe4e6;
    color: #7a1c1c;
}

.maintenance-banner__content {
    max-width: 960px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.maintenance-banner strong {
    font-weight: 600;
}

.maintenance-banner__timer {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
    font-weight: 600;
}

.button-outline {
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
}

.hero-card h1,
.auth-card h1,
.welcome-card h1 {
    margin-top: 0;
    letter-spacing: 0.03em;
}

.text-muted {
    color: var(--text-muted);
}

.actions,
.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.button,
button,
input[type="submit"] {
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-primary,
button.button-primary,
input[type="submit"].button-primary {
    background: linear-gradient(130deg, var(--accent-one), var(--accent-two));
    color: #fff;
    box-shadow: 0 15px 35px rgba(85, 112, 255, 0.35);
}

.button-gradient-primary {
    background: linear-gradient(130deg, var(--accent-one), var(--accent-two)) !important;
    color: #fff !important;
    border: none !important;
}

.button-gradient-primary:hover {
    opacity: 0.9;
}

.button-secondary {
    background: transparent;
    border: 1px solid var(--glass-panel);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
}

.maintenance-notice {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.maintenance-notice .bulma-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.maintenance-card {
    width: 100%;
    max-width: 680px;
    background: var(--bg-card);
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
    padding: clamp(1.5rem, 3vw, 3rem);
}

.maintenance-card__header {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.maintenance-card__eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    opacity: 0.8;
    margin: 0 0 0.35rem;
}

.maintenance-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(80, 56, 187, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5038bb;
}

.maintenance-card__timeline {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
}

.maintenance-card__timeline li {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 500;
}

.maintenance-card__timeline li:last-child {
    border-bottom: none;
}

.maintenance-card__timeline .label {
    color: var(--text-muted);
}

.maintenance-card__callout {
    border-left: 4px solid #5038bb;
    background: rgba(80, 56, 187, 0.07);
    padding: 1rem 1.25rem;
    border-radius: 12px;
}

.maintenance-card__countdown {
    margin: 0.75rem 0 0;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
}

.maintenance-card__countdown--inline {
    margin-top: 0.5rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1200;
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-panel {
    background: var(--bg-card-strong);
    border-radius: 24px;
    max-width: 720px;
    width: 100%;
    box-shadow: var(--shadow-strong);
    padding: 2rem;
}

.modal-panel--sm {
    max-width: 420px;
}

.modal-panel--md {
    max-width: 560px;
}

.modal-panel--lg {
    max-width: 720px;
}

.modal-panel--xl {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: #1f2937;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.dropzone {
    border: 1px dashed var(--border-subtle);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
    background: rgba(17, 19, 34, 0.02);
}

.dropzone.dragging {
    border-color: var(--accent-two);
    background: rgba(79, 195, 247, 0.05);
}

.dropzone p {
    margin: 0.5rem 0 0;
}

.selected-file-label {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(79, 195, 247, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.selected-file-label strong {
    color: var(--accent-two);
}

.project-submit-row {
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

.project-submit-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.project-submit-status[hidden] {
    display: none !important;
}

.project-submit-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(124, 131, 255, 0.25);
    border-top-color: var(--accent-two);
    animation: rotateSpinner 0.8s linear infinite;
}

@keyframes rotateSpinner {
    to {
        transform: rotate(360deg);
    }
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    align-items: stretch;
    width: min(1100px, 92vw);
}

.auth-illustration {
    border-radius: 28px;
    background-size: cover;
    background-position: center;
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

.auth-illustration::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 10, 15, 0.1), rgba(6, 10, 15, 0.75));
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: rgba(5, 8, 15, 0.45);
    color: var(--text-primary);
    font: inherit;
}

@media (prefers-color-scheme: light) {
    input,
    select,
    textarea {
        background: rgba(255, 255, 255, 0.9);
        color: #111;
    }
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-two);
    box-shadow: 0 0 0 2px rgba(90, 200, 250, 0.25);
}

.errorlist {
    list-style: none;
    padding: 0.3rem 0 0;
    margin: 0;
    color: #ff8a8a;
    font-size: 0.9rem;
}

.form-footer {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--accent-two);
    text-decoration: none;
}

.social-auth {
    margin-top: 2.2rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.4rem;
    text-align: center;
}

.social-auth p {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.social-button {
    flex: 1 1 150px;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    text-align: center;
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--text-primary);
}

.social-button.google {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

.social-button.apple {
    background: rgba(0, 0, 0, 0.25);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-main);
}

.header-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.brand-title {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.project-picker {
    position: relative;
}

.project-picker-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    cursor: pointer;
    color: var(--text-primary);
}

.project-picker-menu {
    position: absolute;
    top: 3rem;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-strong);
    padding: 0.5rem 0;
    min-width: 220px;
    display: none;
    z-index: 100;
}

.project-picker-menu.open {
    display: block;
}

.project-picker-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-picker-menu li a,
.project-picker-menu li button {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.project-picker-menu li.empty {
    color: var(--text-muted);
    padding: 0.6rem 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
}

.user-menu {
    position: relative;
}

.user-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    border-radius: 999px;
}

.avatar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-one, #6366f1), var(--accent-two, #0ea5e9));
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.avatar-badge--sm {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.avatar-badge--md {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.avatar-badge--lg {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
    border-width: 3px;
}

.avatar-badge img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-button-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.user-button-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.menu-popover {
    position: absolute;
    right: 0;
    z-index: 200;
    margin-top: 0.5rem;
    background: var(--bg-card-strong);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.6rem;
    min-width: 220px;
    box-shadow: var(--shadow-strong);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
}

.menu-item:hover {
    background: var(--glass-panel);
}

@media (max-width: 768px) {
    .user-header {
        flex-direction: column;
        gap: 1rem;
    }
}

.dashboard-shell main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.logo {
  width: 36px; height: 36px; border-radius: 50%;
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  background: color-mix(in oklab, var(--panel) 96%, transparent);
}

/* Comparables Section */
.script-comparables-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.comparables-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.comparable-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 260px;
    max-width: 320px;
    padding: 1.25rem;
    background: var(--glass-panel);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: inherit;
    text-decoration: none;
}

.comparable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.comparable-poster {
    flex-shrink: 0;
    width: 100%;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--border-subtle);
    margin-bottom: 1rem;
}

.comparable-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 0.5rem;
}

.comparable-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparable-poster-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-muted);
    background: color-mix(in oklab, var(--panel) 75%, transparent);
}

.comparable-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.comparable-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.comparable-year {
    font-weight: 600;
}

.comparable-score {
    font-weight: 600;
    color: var(--accent);
}

.comparable-budget {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Modern Table Styling */
.bulma-table {
    border-collapse: separate;
    border-spacing: 0;
    border: none !important;
    background: transparent;
}

.bulma-table thead th {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-subtle);
    padding: 1rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.bulma-table tbody tr {
    border: none;
    /* background: #ffffff; */
    background: transparent;
    transition: all 0.15s ease;
}

.bulma-table tbody tr:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

.bulma-table tbody tr:hover {
    background: #f9fafb;
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bulma-table tbody td {
    border: none;
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.bulma-table tbody tr:first-child td:first-child {
    border-top-left-radius: 8px;
}

.bulma-table tbody tr:first-child td:last-child {
    border-top-right-radius: 8px;
}

.bulma-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.bulma-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Table container */
.bulma-table-container {
    border-radius: 8px;
    overflow: hidden;
}

/* Zebra striping */

.bulma-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.bulma-table tbody tr:nth-child(even):hover {
    background: #f9fafb;
}


#id_accept_terms  {
    width: 16px;
}

#id_remember {
    width: 16px;
}
