/* Base and Resets */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --nps-detractor: #ef4444;
    --nps-passive: #eab308;
    --nps-promoter: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: auto;
}

/* Background Animated Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.3);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-30px) scale(1.1); }
}

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: visible;
}

/* Typography */
.survey-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.survey-question {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.text-center {
    text-align: center;
}

/* Step transitions */
.survey-step {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateX(20px);
}

.survey-step.active-step {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* NPS Scale Buttons */
.nps-scale {
    margin-bottom: 32px;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.score-buttons {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.score-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.score-btn.selected {
    transform: scale(1.1);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Score colors when selected */
.score-btn[data-score="0"].selected, .score-btn[data-score="1"].selected, .score-btn[data-score="2"].selected,
.score-btn[data-score="3"].selected, .score-btn[data-score="4"].selected, .score-btn[data-score="5"].selected, .score-btn[data-score="6"].selected {
    background: var(--nps-detractor);
    color: #fff;
}

.score-btn[data-score="7"].selected, .score-btn[data-score="8"].selected {
    background: var(--nps-passive);
    color: #fff;
}

.score-btn[data-score="9"].selected, .score-btn[data-score="10"].selected {
    background: var(--nps-promoter);
    color: #fff;
}

/* Forms & Inputs */
.modern-textarea, .modern-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 24px;
}

.modern-textarea:focus, .modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    width: 100%;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-hover);
}

.primary-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.button-group {
    display: flex;
    gap: 16px;
}

/* Success Icon */
.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    color: var(--nps-promoter);
}

/* Dashboard specific */
.dashboard-container {
    max-width: 800px;
}

.gauge-wrapper {
    position: relative;
    width: 300px;
    height: 150px;
    margin: 40px auto;
}

.nps-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-promoter { color: var(--nps-promoter); }
.p-passive { color: var(--nps-passive); }
.p-detractor { color: var(--nps-detractor); }

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.nav-menu {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-item.active {
    color: var(--text-primary);
    background: var(--glass-bg);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.nav-item.logout {
    color: var(--nps-detractor);
    background: rgba(239, 68, 68, 0.05);
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.logout-btn {
    color: var(--nps-detractor);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Nav group dropdowns */
.nav-group {
    position: relative;
}

.nav-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    user-select: none;
    white-space: nowrap;
}

.nav-group-label::after {
    content: '▾';
    font-size: 10px;
    opacity: 0.6;
    margin-left: 2px;
}

.nav-group-label:hover,
.nav-group:hover .nav-group-label {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-group-label.active {
    color: var(--text-primary);
    background: var(--glass-bg);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 6px;
    background: transparent;
    min-width: 200px;
    z-index: 200;
}

.nav-group:hover .nav-dropdown {
    display: block;
}

.nav-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.nav-dropdown .nav-item {
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 14px;
}

.nav-item-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    opacity: 0.5;
    cursor: default;
    white-space: nowrap;
}

html.light-mode .nav-group-label:hover,
html.light-mode .nav-group:hover .nav-group-label {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

html.light-mode .nav-group-label.active {
    color: var(--text-primary);
    background: var(--glass-bg);
    border-color: var(--accent-primary);
}

html.light-mode .nav-dropdown {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* AI Thinking Animation - Pulse and Float */
@keyframes thinkingPulse {
    0% { 
        opacity: 0.6; 
        transform: translateY(0) scale(0.98);
        -webkit-transform: translateY(0) scale(0.98);
        background: rgba(99, 102, 241, 0.05);
    }
    50% { 
        opacity: 1; 
        transform: translateY(-6px) scale(1.02);
        -webkit-transform: translateY(-6px) scale(1.02);
        background: rgba(99, 102, 241, 0.15);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    }
    100% { 
        opacity: 0.6; 
        transform: translateY(0) scale(0.98);
        -webkit-transform: translateY(0) scale(0.98);
        background: rgba(99, 102, 241, 0.05);
    }
}

.thinking-animation {
    animation: thinkingPulse 1.8s infinite ease-in-out;
    -webkit-animation: thinkingPulse 1.8s infinite ease-in-out;
    display: inline-block; /* Remove !important here to let JS control visibility */
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    margin-bottom: 20px;
    transition: all 0.3s;
}

#total-responses {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-top: 32px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#total-responses span {
    color: #ffffff !important;
}

/* AI Analysis Result Styling */
.ai-main-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
}

.ai-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-list-item {
    margin-bottom: 8px;
    padding-left: 12px;
    border-left: 2px solid var(--glass-border);
    color: var(--text-primary);
}

.ai-list-item span {
    color: var(--text-secondary);
    margin-right: 8px;
}

#ai-result strong {
    color: var(--text-primary);
    font-weight: 600;
}

#ai-result {
    color: var(--text-primary);
}

html.light-mode #ai-result,
html.light-mode #ai-result * {
    color: #1e293b !important;
}

.modern-table td {
    padding: 4px 12px !important;
    vertical-align: middle;
    line-height: 1.1 !important;
}

/* Reset Database Button */
.reset-db-btn {
    background: transparent;
    color: rgba(239, 68, 68, 0.4);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 40px;
    display: inline-block;
}

.reset-db-btn:hover {
    color: var(--nps-detractor);
    border-color: var(--nps-detractor);
    background: rgba(239, 68, 68, 0.05);
}

/* Simple Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1e1e2e;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ── Light Mode: variable overrides ─────────────────────────────────── */
html.light-mode {
    --bg-color:      #f1f5f9;
    --glass-bg:      rgba(255, 255, 255, 0.78);
    --glass-border:  rgba(0, 0, 0, 0.09);
    --text-primary:  #0f172a;
    --text-secondary:#475569;
}

/* Blobs (softer in light) */
html.light-mode .shape-1 { background: rgba(99, 102, 241, 0.12); }
html.light-mode .shape-2 { background: rgba(236, 72, 153, 0.08); }

/* Hardcoded backgrounds */
html.light-mode .modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}
html.light-mode .modern-textarea,
html.light-mode .modern-input {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.12);
}
html.light-mode .modern-textarea:focus,
html.light-mode .modern-input:focus {
    border-color: var(--primary-color);
}
html.light-mode .stat-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
    --csat-score-color: #858585;
}
html.light-mode #distribution-chart-container,
html.light-mode #history-chart-container {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.08);
}
html.light-mode #ai-analysis-card {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
}
html.light-mode #tokens-list-container {
    background: rgba(0, 0, 0, 0.04);
}

/* Buttons */
html.light-mode .secondary-btn {
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.15);
}
html.light-mode .secondary-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}
html.light-mode .reset-db-btn {
    color: rgba(239, 68, 68, 0.55);
    border-color: rgba(239, 68, 68, 0.25);
}
html.light-mode .reset-db-btn:hover {
    color: var(--nps-detractor);
    border-color: var(--nps-detractor);
    background: rgba(239, 68, 68, 0.05);
}

/* Nav */
html.light-mode .nav-item {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
}
html.light-mode .nav-item:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}
html.light-mode .nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-color);
}
html.light-mode .nav-bar {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Survey score buttons */
html.light-mode .score-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}
html.light-mode .score-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* CSAT tooltip */
html.light-mode .calc-explanation {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* Home cards */
html.light-mode .module-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}
html.light-mode .secondary-link { color: #64748b; }
html.light-mode .secondary-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}
html.light-mode .home-secondary-links {
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* Survey title gradient */
html.light-mode .survey-title {
    background: linear-gradient(to right, #1e293b, #475569);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Theme toggle — absolute corner position inside .glass-container */
.theme-toggle-corner {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

/* Theme toggle nav button */
.theme-toggle-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.theme-toggle-nav:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}
html.light-mode .theme-toggle-nav {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}
html.light-mode .theme-toggle-nav:hover {
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}

/* ── Login Page ──────────────────────────────────────────────────────── */
.login-page {
    position: relative;
}

#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.theme-toggle-btn {
    position: fixed;
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

.login-card {
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 18px;
    display: block;
    animation: logoBounce 0.6s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes logoBounce {
    from { opacity: 0; transform: scale(0.4); }
    to   { opacity: 1; transform: scale(1); }
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Floating label fields */
.float-field {
    position: relative;
    margin-bottom: 20px;
}

.float-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 22px 16px 8px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    outline: none;
}

.float-input.has-toggle {
    padding-right: 46px;
}

.float-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.05);
}

.float-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
}

.float-input:focus ~ .float-label,
.float-input:not(:placeholder-shown) ~ .float-label {
    top: 12px;
    transform: translateY(0) scale(0.78);
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.toggle-pwd-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-pwd-btn:hover { color: var(--text-primary); }

/* Error */
.login-error {
    color: var(--nps-detractor);
    font-size: 13px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    text-align: center;
}

/* Login button */
.login-btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.login-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(99, 102, 241, 0.55);
}

.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.login-btn.login-btn-success {
    background: var(--nps-promoter);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(34, 197, 94, 0.45);
}

.spin-icon { animation: spin 0.75s linear infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

.shake { animation: shake 0.4s ease; }

/* Light mode overrides for login */
html.light-mode .login-card {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 32px 64px -12px rgba(79, 70, 229, 0.12);
}
html.light-mode .login-title {
    background: linear-gradient(to right, #1e293b, #475569);
    -webkit-background-clip: text;
    background-clip: text;
}
html.light-mode .login-subtitle { color: #64748b; }
html.light-mode .float-input {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.2);
    color: #1e293b;
}
html.light-mode .float-label { color: #64748b; }
html.light-mode .toggle-pwd-btn { color: #64748b; }
html.light-mode .toggle-pwd-btn:hover { color: #1e293b; }
html.light-mode .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.2);
    color: #475569;
}

@media (max-width: 480px) {
    .login-card {
        border-radius: 0;
        min-height: 100vh;
        padding: 48px 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 100%;
    }
}

/* Home Module Cards */
.home-container {
    max-width: 900px;
}

.module-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 32px 0;
}

.module-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.module-card:hover {
    transform: translateY(-6px);
}

.module-card.nps-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.07);
}

.module-card.csat-card:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.07);
}

.module-card-icon {
    font-size: 52px;
    margin-bottom: 16px;
    line-height: 1;
}

.module-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.module-card-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.6;
}

.module-card-metric {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.module-card.nps-card .module-card-metric { color: var(--primary-color); }
.module-card.csat-card .module-card-metric { color: #10b981; }

.module-card-metric-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 24px;
}

/* URL row inside each card */
.module-card-url-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 7px 10px;
    margin-bottom: 16px;
}

.module-card-url-link {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    transition: color 0.2s ease;
    overflow: hidden;
}

.module-card-url-link:hover { color: var(--text-primary); }

.module-card-url-link svg { flex-shrink: 0; }

.module-card-url-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-card-url-copy {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
    transition: all 0.2s ease;
}

.module-card-url-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.module-card-url-copy.copied {
    color: #10b981;
}

html.light-mode .module-card-url-row {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.09);
}

html.light-mode .module-card-url-copy:hover {
    background: rgba(0, 0, 0, 0.06);
}

.module-card-cta {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 10px;
    border: 1px solid;
    text-decoration: none;
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.module-card.nps-card .module-card-cta {
    color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.module-card.nps-card:hover .module-card-cta {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.module-card.csat-card .module-card-cta {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}

.module-card.csat-card:hover .module-card-cta {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.home-secondary-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
}

.secondary-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.secondary-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 600px) {
    .glass-container {
        border-radius: 0;
        min-height: 100vh;
        padding: 24px 16px;
    }
    
    .nav-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nav-bar > div {
        display: flex;
        gap: 12px;
        width: 100%;
        justify-content: center;
    }

    .nav-bar .btn, .nav-bar .logout-btn {
        flex: 1;
        max-width: 150px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 42px; /* Fixed height for symmetry */
        margin: 0 !important;
        padding: 0 16px !important;
        font-size: 13px !important;
    }

    .module-cards-grid {
        grid-template-columns: 1fr;
    }

    .nps-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-hero {
        gap: 20px !important;
    }

    .gauge-wrapper {
        width: 100% !important;
        max-width: 280px;
    }

    .score-display {
        width: 100%;
    }

    .score-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .score-btn {
        margin-bottom: 8px;
    }
    
    .button-group {
        flex-direction: column-reverse;
    }
}
