/* Vaken Beta Feedback — Shared Styles */

:root {
    --bg-primary: #0d0d1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-input: #12122a;
    --border: #2a2a4a;
    --accent: #4361ee;
    --accent-hover: #3451de;
    --success: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.1);
    --warning: #f39c12;
    --danger: #e74c3c;
    --text-primary: #e0e0e0;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --star-color: #f1c40f;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* --- Layout --- */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

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

/* --- Header --- */

.header {
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.header .brand {
    color: var(--accent);
}

.header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.header .tester-info {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header .tester-info span {
    color: var(--accent);
    font-weight: 600;
}

.logout-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* --- Login Page --- */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.login-card h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.login-card .app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

/* --- Forms --- */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

/* --- Screen Cards --- */

.screen-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: border-color 0.3s;
}

.screen-card.submitted {
    border-color: var(--success);
}

.screen-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.screen-card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.screen-card-header .screen-number {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(67, 97, 238, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
}

.screen-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.submitted-badge {
    display: none;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
}

.screen-card.submitted .submitted-badge {
    display: inline-flex;
}

.check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* --- Screenshot Placeholder --- */

.screenshot-area {
    width: 100%;
    max-width: 300px;
    height: 500px;
    background: linear-gradient(135deg, #1a1a3e, #0d0d2a);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

.screenshot-area .phone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.screenshot-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* --- Star Rating --- */

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
    margin-bottom: 10px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: color 0.15s;
    line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--star-color);
}

/* --- Radio Groups --- */

.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.radio-option {
    position: relative;
}

.radio-option input {
    display: none;
}

.radio-option label {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.radio-option input:checked + label {
    border-color: var(--accent);
    background: rgba(67, 97, 238, 0.15);
    color: var(--accent);
}

.radio-option label:hover {
    border-color: var(--accent);
}

/* --- Feedback Form --- */

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feedback-question {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.feedback-question h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.feedback-question p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.submit-row .btn {
    width: auto;
}

/* --- General Feedback Section --- */

.general-section {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.general-section h2 {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: var(--accent);
}

.general-section .section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* --- Progress Bar --- */

.progress-bar-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.progress-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

/* --- Admin Dashboard --- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* --- Admin Tabs --- */

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

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

/* --- Rating Bars (Admin) --- */

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rating-bar-label {
    width: 180px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.rating-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #7c3aed);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}

.rating-bar-value {
    width: 50px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--star-color);
    flex-shrink: 0;
}

/* --- Feedback Cards (Admin) --- */

.feedback-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.feedback-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.feedback-card-header .tester-name {
    font-weight: 600;
    color: var(--accent);
}

.feedback-card-header .timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.feedback-field {
    margin-bottom: 10px;
}

.feedback-field .field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.feedback-field .field-value {
    font-size: 0.9rem;
}

.feedback-field .stars-display {
    color: var(--star-color);
    font-size: 1rem;
    letter-spacing: 2px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* --- Timeline --- */

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
    font-size: 0.9rem;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.timeline-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    width: 120px;
    flex-shrink: 0;
}

/* --- Tester List (Admin) --- */

.tester-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tester-list-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.tester-list-item .name {
    font-weight: 600;
}

.tester-list-item .count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Export Buttons --- */

.export-row {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

/* --- Screen Nav (Admin) --- */

.screen-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.screen-nav-item {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.screen-nav-item:hover,
.screen-nav-item.active {
    border-color: var(--accent);
    background: rgba(67, 97, 238, 0.1);
    color: var(--accent);
}

.screen-nav-item .nav-rating {
    display: block;
    font-size: 0.75rem;
    color: var(--star-color);
    margin-top: 4px;
}

/* --- Toast --- */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- Responsive --- */

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    .header {
        padding: 24px 12px 20px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .screen-card {
        padding: 16px;
    }

    .login-card {
        padding: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshot-area {
        height: 400px;
    }

    .radio-group {
        gap: 8px;
    }

    .radio-option label {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .export-row {
        flex-direction: column;
    }

    .tabs {
        gap: 0;
    }

    .tab {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .screen-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-time {
        width: 80px;
        font-size: 0.7rem;
    }

    .rating-bar-label {
        width: 100px;
        font-size: 0.8rem;
    }
}
