/* ============ Reset & Base ============ */
* { box-sizing: border-box; }
:root {
    --navy-900: #061024;
    --navy-800: #0a1a3a;
    --navy-700: #0f2557;
    --navy-600: #16337a;
    --navy-500: #1e4499;
    --accent: #d4af37;
    --accent-light: #f2d879;
    --cyan: #2fb8c6;
    --bg: #f2f5fa;
    --text-dark: #1a2333;
    --text-muted: #64748b;
    --radius: 14px;
    --shadow-sm: 0 2px 8px rgba(10, 26, 58, 0.08);
    --shadow-md: 0 8px 24px rgba(10, 26, 58, 0.12);
    --shadow-lg: 0 16px 40px rgba(10, 26, 58, 0.18);
}
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Poppins', 'Segoe UI', sans-serif; }
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ Header ============ */
.site-header {
    position: relative;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-500) 100%);
    color: #fff;
    padding: 26px 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.header-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, rgba(212, 175, 55, 0) 70%);
    pointer-events: none;
}
.header-inner { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent-light);
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
}
.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.site-subtitle {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}
main.container {
    padding: 34px 20px 50px;
}
.site-footer {
    text-align: center;
    padding: 22px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 30px;
}
.site-footer i { color: var(--navy-600); margin-right: 6px; }

/* ============ Back link ============ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 18px;
    transition: gap .15s ease, color .15s ease;
}
.back-link:hover { gap: 12px; color: var(--navy-800); }

/* ============ Intro / Home ============ */
.intro { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.intro h2 {
    font-size: 1.8rem;
    color: var(--navy-800);
    margin-bottom: 10px;
}
.intro p { color: var(--text-muted); font-size: 1.02rem; }

.type-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 24px;
}
.type-card {
    position: relative;
    display: block;
    background: #fff;
    border-radius: var(--radius);
    padding: 30px 26px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8edf5;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.type-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 0;
}
.type-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.type-card:hover::before { opacity: 1; }
.type-card .type-icon,
.type-card h3,
.type-card p { position: relative; z-index: 1; transition: color .2s ease; }
.type-card .type-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    transition: background .2s ease, color .2s ease;
}
.type-card:hover .type-icon { background: rgba(255, 255, 255, 0.15); color: var(--accent-light); }
.type-card h3 { margin: 0 0 8px; color: var(--navy-800); font-size: 1.2rem; }
.type-card:hover h3 { color: #fff; }
.type-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.type-card:hover p { color: rgba(255, 255, 255, 0.85); }
.type-card .type-arrow {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-600);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.type-card:hover .type-arrow { color: var(--accent-light); }

/* ============ Forms ============ */
.survey-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8edf5;
}
.survey-form h2 {
    color: var(--navy-800);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}
.form-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--navy-600);
    font-weight: 700;
    margin: 26px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef2f8;
}
.form-group { margin-bottom: 22px; }
.form-group label { font-weight: 600; display: block; margin-bottom: 8px; color: var(--text-dark); }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dde3ee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
    background: #fbfcfe;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(30, 68, 153, 0.12);
    background: #fff;
}

.question-block {
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #eef2f8;
}
.question-block label { color: var(--navy-800); }

.likert-scale {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.likert-option {
    flex: 1;
    min-width: 90px;
    text-align: center;
    background: #fff;
    border-radius: 10px;
    padding: 12px 6px;
    cursor: pointer;
    font-weight: normal !important;
    border: 1.5px solid #e2e8f0;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.likert-option:hover { transform: translateY(-2px); border-color: var(--navy-500); }
.likert-option input { margin-bottom: 6px; accent-color: var(--navy-600); }
.likert-option:has(input:checked) {
    border-color: var(--navy-600);
    background: linear-gradient(135deg, #eef3fb, #e3ecfa);
}
.likert-option small { font-weight: normal; color: var(--text-muted); }

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
    color: #fff;
    border: none;
    padding: 13px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(22, 51, 122, 0.3);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(22, 51, 122, 0.38); }

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2be; }
.alert-success { background: #e6f4ea; color: #1e7c34; border: 1px solid #b9e3c6; }

.thanks {
    text-align: center;
    background: #fff;
    padding: 50px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8edf5;
}
.thanks .thanks-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-700), var(--cyan));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 18px;
}
.thanks h2 { color: var(--navy-800); }

/* ============ Admin ============ */
.admin-login-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-login {
    max-width: 400px;
    width: 100%;
    background: #fff;
    padding: 36px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid #e8edf5;
}
.admin-login .admin-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 16px;
    overflow: hidden;
    padding: 6px;
}
.admin-login .admin-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.admin-login h2 { text-align: center; color: var(--navy-800); }

.admin-nav {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    padding: 14px 0;
    box-shadow: var(--shadow-sm);
}
.admin-nav .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-nav .nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-right: 18px;
    font-size: 0.92rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .15s ease;
}
.admin-nav .nav-links a:hover,
.admin-nav .nav-links a.active { color: var(--accent-light); }
.admin-nav .nav-user { color: rgba(255,255,255,0.7); font-size: 0.88rem; display: flex; align-items: center; gap: 14px; }
.admin-nav .nav-user a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

h2.page-title { color: var(--navy-800); display: flex; align-items: center; gap: 10px; }

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}
.summary-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8edf5;
    display: flex;
    align-items: center;
    gap: 16px;
}
.summary-card .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.summary-card .value { font-size: 1.7rem; font-weight: 700; color: var(--navy-800); line-height: 1.1; }
.summary-card .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-success { background: #e6f4ea; color: #1e7c34; }
.badge-info { background: #e3f2fd; color: #0d63a5; }
.badge-warning { background: #fff4e0; color: #a5680d; }
.badge-danger { background: #fdecea; color: #b3261e; }

.filter-bar {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-bar label { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.filter-bar select {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid #dde3ee;
    font-family: inherit;
    background: #fff;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8edf5;
}
table.data-table th, table.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f8;
    text-align: left;
    font-size: 0.9rem;
}
table.data-table th {
    background: #f4f7fc;
    color: var(--navy-700);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
}
table.data-table tbody tr:hover { background: #f8fafc; }
table.data-table a { color: var(--navy-600); font-weight: 600; text-decoration: none; }
table.data-table a:hover { text-decoration: underline; }

.type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #eef3fb;
    color: var(--navy-700);
}

.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-label { width: 300px; font-size: 0.85rem; color: var(--text-dark); flex-shrink: 0; }
.bar-track { flex: 1; background: #eef2f8; border-radius: 6px; height: 20px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--navy-600), var(--cyan)); height: 100%; border-radius: 6px; transition: width .4s ease; }
.bar-value { width: 60px; text-align: right; font-size: 0.85rem; font-weight: 700; color: var(--navy-800); }

.card-section {
    background: #fff;
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8edf5;
    margin-bottom: 26px;
}
.card-section h3 {
    margin-top: 0;
    color: var(--navy-800);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}
.card-section .section-desc { color: var(--text-muted); font-size: 0.88rem; margin-top: -10px; margin-bottom: 18px; }

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 22px;
    margin-bottom: 26px;
}
.chart-wrap { position: relative; height: 280px; }
.chart-wrap.tall { height: 340px; }

.distribution-grid {
    display: flex;
    gap: 4px;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.feedback-list { display: flex; flex-direction: column; gap: 12px; }
.feedback-item {
    background: #f8fafc;
    border-left: 4px solid var(--navy-500);
    border-radius: 8px;
    padding: 12px 16px;
}
.feedback-item .meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.feedback-item .meta a { color: var(--navy-600); text-decoration: none; font-weight: 600; margin-left: auto; }
.feedback-item .meta a:hover { text-decoration: underline; }
.feedback-item .text { font-size: 0.92rem; color: var(--text-dark); }

.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    background: #f4f7fc;
    color: var(--navy-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid #e2e8f0;
    transition: background .15s ease, color .15s ease;
}
.page-link:hover { background: #e3ecfa; }
.page-link.active { background: linear-gradient(135deg, var(--navy-700), var(--navy-500)); color: #fff; border-color: transparent; }

.detail-info { background: #f8fafc; border-radius: 12px; padding: 18px 22px; margin-bottom: 20px; }
.detail-info dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; }
.detail-info dt { font-weight: 600; color: var(--navy-700); font-size: 0.85rem; }
.detail-info dd { margin: 0; font-size: 0.92rem; }

@media (max-width: 640px) {
    .brand { gap: 12px; }
    .brand-icon { width: 44px; height: 44px; font-size: 1.3rem; }
    .site-header h1 { font-size: 1.2rem; }
    .bar-label { width: 160px; font-size: 0.78rem; }
    .detail-info dl { grid-template-columns: 1fr; }
}
