/* assets/css/style.css */
:root {
    --primary: #0b3b2c;
    --primary-light: #1a6b4a;
    --primary-gradient: linear-gradient(135deg, #0b3b2c 0%, #1a6b4a 100%);
    --bg: #f0f4f9;
    --card-shadow: 0 25px 50px -12px rgba(0,0,0,0.20);
    --radius: 32px;
    --radius-sm: 14px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    padding: 24px;
    color: #1e293b;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== CARD ===== */
.survey-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

/* ===== HEADER ===== */
.survey-header {
    background: var(--primary-gradient);
    padding: 28px 40px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.survey-header::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.logo-container {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    padding: 4px;
}

.header-title h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-title .sub {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 400;
}

.header-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.18);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-desc {
    margin-top: 16px;
    font-size: 15px;
    opacity: 0.90;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    max-width: 90%;
}

/* ===== NAV ===== */
.header-nav {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.nav-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.20);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
    text-decoration: none;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}

/* ===== BODY ===== */
.survey-body {
    padding: 36px 40px 40px;
}

.page {
    display: none;
    animation: fadeUp 0.35s ease;
}

.page.active {
    display: block;
}

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

.intro {
    font-size: 15px;
    color: #475569;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9edf2;
    line-height: 1.7;
}

.intro strong {
    color: var(--primary);
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 26px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #0f1a2c;
    margin-bottom: 6px;
}

.form-label .required {
    color: #dc2626;
    margin-left: 2px;
}

.form-label .label-desc {
    font-weight: 400;
    font-size: 13px;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d9e6;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafcfe;
    color: #1e293b;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(26,107,74,0.10);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ===== RADIO ===== */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 6px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px 6px 8px;
    border-radius: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
    user-select: none;
}

.radio-option:hover {
    background: #edf2f7;
    border-color: #cbd5e1;
}

.radio-option input[type="radio"] {
    accent-color: var(--primary-light);
    width: 17px;
    height: 17px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.radio-option.selected {
    background: #e6f0ec;
    border-color: var(--primary-light);
}

/* ===== STAR RATING ===== */
.star-rating-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.star-rating {
    display: flex;
    gap: 8px;
    font-size: 38px;
    line-height: 1;
    direction: rtl;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fbbf24;
}

.star-rating label:hover {
    transform: scale(1.08);
}

.star-text {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
    min-height: 24px;
}

/* ===== TEXTAREA ===== */
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d9e6;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafcfe;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(26,107,74,0.12);
}

/* ===== BUTTON ===== */
.btn-submit {
    width: 100%;
    padding: 16px 28px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 20px -8px rgba(26,107,74,0.35);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(26,107,74,0.45);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    background: #e9edf2;
    color: #1e293b;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #d1d9e6;
    box-shadow: none;
}

/* ===== THANK YOU ===== */
.thank-you {
    display: none;
    text-align: center;
    padding: 28px 20px 12px;
}

.thank-you .icon {
    font-size: 64px;
    color: var(--primary-light);
    background: #e6f0ec;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.thank-you h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.thank-you p {
    color: #475569;
    font-size: 16px;
    line-height: 1.7;
    max-width: 440px;
    margin: 0 auto;
}

.thank-you .btn-reset {
    margin-top: 24px;
    padding: 12px 32px;
    background: #e9edf2;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.15s;
}

.thank-you .btn-reset:hover {
    background: #d1d9e6;
}

/* ===== DASHBOARD ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #f8fafc;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid #e9edf2;
    text-align: center;
}

.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card .label {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

.stat-card .sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}

@media (max-width: 700px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

.chart-box {
    background: #fafcfe;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid #e9edf2;
}

.chart-box h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0f1a2c;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-box h4 i {
    color: var(--primary-light);
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.bar-item .bar-label {
    min-width: 100px;
    font-weight: 500;
    color: #334155;
}

.bar-item .bar-track {
    flex: 1;
    height: 8px;
    background: #e9edf2;
    border-radius: 10px;
    overflow: hidden;
}

.bar-item .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), #2b9d6e);
    border-radius: 10px;
    transition: width 0.6s ease;
    width: 0%;
}

.bar-item .bar-value {
    min-width: 32px;
    text-align: right;
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #e9edf2;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.table-wrap th {
    background: #f1f5f9;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}

.table-wrap td {
    padding: 11px 16px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
}

.table-wrap tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

.badge-info { background: #dbeafe; color: #1e40af; }
.badge-primary { background: #e6f0ec; color: var(--primary); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-secondary { background: #f1f5f9; color: #475569; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 56px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
    color: #475569;
}

/* ===== LOGIN ===== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.login-overlay.show {
    display: flex;
}

.login-box {
    background: #fff;
    border-radius: 28px;
    padding: 40px 36px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.4);
    animation: fadeUp 0.3s ease;
    position: relative;
}

.login-box .close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
}

.login-box .close-btn:hover {
    color: #1e293b;
}

.login-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-box p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    margin-bottom: 16px;
    align-items: center;
    gap: 8px;
}

.login-error.show {
    display: flex;
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 12px; }
.flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #dc2626;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
    .survey-header { padding: 20px; }
    .survey-body { padding: 20px; }
    .header-title h1 { font-size: 21px; }
    .logo-container { width: 52px; height: 52px; }
    .header-badge { margin-left: 0; width: 100%; justify-content: center; }
    .header-desc { max-width: 100%; font-size: 14px; }
    .radio-group { gap: 8px 10px; }
    .radio-option { font-size: 13px; padding: 5px 10px 5px 6px; }
    .star-rating { font-size: 32px; gap: 5px; }
    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    .stat-card .number { font-size: 26px; }
    .login-box { padding: 30px 24px; }
}

@media (max-width: 440px) {
    body { padding: 12px; }
    .survey-header { padding: 16px; }
    .survey-body { padding: 16px; }
    .header-title h1 { font-size: 18px; }
    .logo-container { width: 44px; height: 44px; }
    .radio-group { flex-direction: column; gap: 6px; }
    .radio-option { width: 100%; padding: 8px 14px; }
    .star-rating { font-size: 28px; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .bar-item .bar-label { min-width: 70px; font-size: 12px; }
    .login-box h3 { font-size: 20px; }
}