:root {
    /* Brand Colors based on the provided logo */
    --primary-color: #F47E20; /* Orange */
    --primary-light: #F89B4E;
    --primary-dark: #D46613;
    --brand-brown: #451A18; /* Dark Brown */
    
    --bg-color: #FEF6F0; /* Light cream */
    --card-bg: rgba(255, 255, 255, 0.95);
    
    --text-main: #2D3748;
    --text-muted: #718096;
    --border-color: #E2E8F0;
    --error-color: #E53E3E;
    
    /* Category Colors */
    --c-promoter: #38A169; /* Green */
    --c-passive: #D69E2E;  /* Yellow */
    --c-detractor: #E53E3E; /* Red */
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background elements for glassmorphism */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(90px);
    opacity: 0.4;
    border-radius: 50%;
}

.shape-1 {
    top: -10%;
    right: -5%;
    width: 450px;
    height: 450px;
    background: var(--primary-color);
    animation: float 10s infinite ease-in-out alternate;
}

.shape-2 {
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: #FBD38D;
    animation: float 12s infinite ease-in-out alternate-reverse;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

/* Header & Logo */
.app-header {
    text-align: center;
    animation: slideDown 0.6s ease-out forwards;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.logo-text {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--brand-brown);
    letter-spacing: 2px;
    font-family: 'Times New Roman', Times, serif; /* To match the classic feel */
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.logo-flower {
    font-size: 4rem;
    color: var(--brand-brown);
    margin-bottom: -10px;
}

.subtitle {
    color: var(--brand-brown);
    font-size: 1.2rem;
    font-weight: 600;
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    margin-top: 10px;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 35px 40px;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.row {
    display: flex;
    gap: 20px;
}

.col {
    flex: 1;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 1rem;
}

.required {
    color: var(--error-color);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(244, 126, 32, 0.15);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}

.hidden-input {
    display: none;
    margin-top: 10px;
}
.hidden-input.show {
    display: block;
    animation: fadeIn 0.3s;
}

/* Bulletproof NPS Scale (1-10) */
.nps-scale {
    margin-top: 10px;
    width: 100%;
}

.nps-options {
    display: flex;
    flex-wrap: nowrap; /* Force one line if possible */
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.nps-option {
    flex: 1 1 0;
    min-width: 0; /* Important for flex shrink */
    border-right: 1px solid var(--border-color);
}

.nps-option:last-child {
    border-right: none;
}

.nps-option input[type="radio"] {
    display: none;
}

.nps-label-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    background: #FAFAFA;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}

.nps-option input[type="radio"]:checked + .nps-label-box {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
}

.nps-option:hover .nps-label-box {
    background: #FFF1E5;
    color: var(--primary-color);
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Checkboxes and Radios */
.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.row-group {
    flex-direction: row;
    gap: 30px;
}

.custom-checkbox, .custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    padding-left: 32px;
}

.custom-checkbox input, .custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark, .radio-mark {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.custom-checkbox .checkmark {
    border-radius: 6px;
}

.custom-radio .radio-mark {
    border-radius: 50%;
}

.custom-checkbox:hover input ~ .checkmark,
.custom-radio:hover input ~ .radio-mark {
    border-color: var(--primary-light);
}

.custom-checkbox input:checked ~ .checkmark,
.custom-radio input:checked ~ .radio-mark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after, .radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after,
.custom-radio input:checked ~ .radio-mark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-radio .radio-mark:after {
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Buttons */
.mt-2 { margin-top: 10px; }
.mt-4 { margin-top: 25px; }

.actions {
    margin-top: 30px;
}

.center {
    text-align: center;
}

button {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 126, 32, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 126, 32, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--brand-brown);
    border: 2px solid var(--brand-brown);
}

.btn-secondary:hover {
    background: var(--brand-brown);
    color: white;
}

.btn-danger {
    background: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.btn-danger:hover {
    background: var(--error-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Thank you section */
.success-header {
    text-align: center;
    padding: 30px 0;
}

.success-icon {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-header h2 {
    color: var(--brand-brown);
    font-size: 2rem;
    margin-bottom: 15px;
}

.success-header p {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Dashboard / Admin */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-header h2 {
    color: var(--brand-brown);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-brown);
}

.stat-nps .stat-value {
    color: var(--primary-color);
}

/* Progress bar */
.progress-bar-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.bg-promoter { background-color: var(--c-promoter); }
.bg-passive { background-color: var(--c-passive); }
.bg-detractor { background-color: var(--c-detractor); }

.progress-bar {
    height: 12px;
    background: #EDF2F7;
    border-radius: 6px;
    display: flex;
    overflow: hidden;
}

.bar-segment {
    height: 100%;
    transition: width 0.5s ease;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #FAFAFA;
    font-weight: 600;
    color: var(--brand-brown);
    white-space: nowrap;
}

.data-table tr:hover {
    background: #FFF9F5;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.action-text {
    font-size: 0.85rem;
    color: #4A5568;
    white-space: pre-line;
    max-width: 300px;
}

/* Modals & Footer */
.app-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 10px;
}

.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .card {
        padding: 25px 20px;
    }

    .nps-label-box {
        height: 40px;
        font-size: 0.95rem;
    }
    
    .nps-labels {
        font-size: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
