@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #31105c 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.15);
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Header & Navbar */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-btn {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: #818cf8;
}

/* Main Container */
.main-container {
    max-width: 860px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    flex: 1;
    width: 100%;
}

.admin-container {
    max-width: 1200px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.question-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.question-badge {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Form Elements */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.options-grid-single {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    color: var(--text-main);
}

.option-label:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio,
.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-muted);
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

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

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

.option-label input[type="radio"]:checked ~ .custom-radio {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}

.option-label input[type="radio"]:checked ~ .custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.option-label input[type="checkbox"]:checked ~ .custom-checkbox {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}

.option-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

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

/* Other Input Field */
.other-input-wrapper {
    margin-top: 1rem;
    padding-left: 2.75rem;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.other-input-wrapper.active {
    display: block;
}

.input-text, .textarea-custom {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-text:focus, .textarea-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.textarea-custom {
    min-height: 140px;
    resize: vertical;
}

/* NPS Score Group */
.nps-wrapper {
    margin-top: 1rem;
}

.nps-numbers {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.nps-btn {
    flex: 1;
    min-width: 45px;
    height: 50px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.nps-btn:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

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

.nps-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary);
    transform: translateY(-3px);
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 0.5rem;
}

/* Submit Button */
.submit-btn {
    display: block;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

/* Admin Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.danger { background: rgba(244, 63, 94, 0.15); color: var(--danger); }

.stat-details h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-details .stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--card-bg);
}

.tab-btn.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* Charts & Bars */
.chart-card {
    margin-bottom: 2rem;
}

.bar-chart-item {
    margin-bottom: 1.25rem;
}

.bar-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.bar-label { font-weight: 500; }
.bar-value { color: var(--text-muted); }

.bar-track {
    height: 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--input-border);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #c084fc 100%);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Data Table */
.table-container {
    overflow-x: auto;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 1.25rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
    font-size: 0.95rem;
}

.admin-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 0.95rem;
}

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

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.action-btn {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}

.action-btn.view { background: var(--primary-light); color: #818cf8; border: 1px solid var(--primary); }
.action-btn.view:hover { background: var(--primary); color: white; }

.action-btn.delete { background: rgba(244, 63, 94, 0.15); color: var(--danger); border: 1px solid var(--danger); }
.action-btn.delete:hover { background: var(--danger); color: white; }

.export-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    float: right;
    margin-bottom: 1rem;
}

.export-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #1e293b;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.modal-close:hover {
    color: var(--danger);
}

.modal-body .detail-group {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.modal-body .detail-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-body .detail-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-body .detail-value {
    font-size: 1.1rem;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--input-border);
}

/* Success Message / Screen */
.success-card {
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    animation: bounceIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.success-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.success-card p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-home {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-home:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes bounceIn { 
    0% { transform: scale(0); } 
    50% { transform: scale(1.1); } 
    100% { transform: scale(1); } 
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container { padding: 1rem; }
    .main-container { margin: 1.5rem auto; padding: 0 1rem; }
    .card { padding: 1.75rem; }
    .hero h1 { font-size: 2rem; }
    .nps-btn { min-width: 35px; height: 45px; font-size: 1rem; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .admin-tabs { flex-wrap: wrap; }
    .tab-btn { flex: 1; text-align: center; justify-content: center; }
}
