/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f172a;
    /* slate-900 */
    color: #e5e7eb;
    /* gray-200 */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
}

/* LAYOUT */
.container {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #020617;
    /* very dark */
    border-bottom: 1px solid #1e293b;
}

.brand {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-right a {
    color: #e5e7eb;
    text-decoration: none;
    margin-left: 16px;
    font-size: 0.9rem;
}

.nav-right a:hover {
    color: #38bdf8;
}

/* BADGE */
.user-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-right: 8px;
}

.user-badge.free {
    background: #334155;
}

.user-badge.paid {
    background: #16a34a;
    color: #052e16;
}

/* BUTTON */
.btn-primary {
    background: #2563eb;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 6px;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* HERO */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.subtitle {
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* UPLOAD */
.upload-section {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.upload-card {
    background: #020617;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #1e293b;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.file-input {
    display: block;
    margin-bottom: 20px;
}

.file-input input {
    display: none;
}

.file-input span {
    display: block;
    padding: 14px;
    border: 1px dashed #334155;
    border-radius: 8px;
    cursor: pointer;
    color: #cbd5f5;
}

.file-input span:hover {
    background: #020617;
}

.btn-large {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

.upload-note {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* PRICING */
.pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.price-card {
    background: #020617;
    border: 1px solid #1e293b;
    padding: 24px;
    border-radius: 12px;
}

.price-card h3 {
    margin-bottom: 14px;
}

.price-card ul {
    list-style: none;
    font-size: 0.9rem;
}

.price-card li {
    margin-bottom: 8px;
}

.price-card.highlight {
    border-color: #2563eb;
}

/* LANGUAGE SWITCHER */
.lang-switch {
    display: flex;
    gap: 6px;
    margin-right: 16px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    color: #cbd5f5;
    border: 1px solid #1e293b;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: #020617;
    color: #fff;
}

.lang-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* AUTH (LOGIN / REGISTER) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, #020617, #0f172a);
}

.auth-card {
    background: #020617;
    border: 1px solid #1e293b;
    padding: 32px;
    border-radius: 14px;
    width: 100%;
    max-width: 360px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 20px;
}

.auth-card label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #cbd5f5;
}

.auth-card input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #1e293b;
    background: #0f172a;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.auth-card input:focus {
    outline: none;
    border-color: #2563eb;
}

.auth-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #38bdf8;
    text-decoration: none;
}

.alert.error {
    background: #450a0a;
    color: #fecaca;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

/* REPORT */
.report-header {
    margin-bottom: 30px;
}

.report-header h1 {
    margin-bottom: 10px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.report-card {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 24px;
}

.diag-category {
    font-weight: 600;
    margin-bottom: 8px;
}

.diag-category.hardware {
    color: #f97316;
}

.diag-category.software {
    color: #38bdf8;
}

.confidence {
    display: inline-block;
    margin: 10px 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.confidence.very-high {
    background: #16a34a;
    color: #052e16;
}

.confidence.high {
    background: #2563eb;
}

.confidence.medium {
    background: #f59e0b;
}

.reason {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #cbd5f5;
}

.ai-text {
    font-size: 0.9rem;
    color: #e5e7eb;
    line-height: 1.7;
}

.upgrade-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #334155;
}

/* LIMIT PAGE */
.limit-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.limit-card {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 32px;
    max-width: 420px;
    text-align: center;
}

.limit-card h2 {
    margin-bottom: 12px;
}

.limit-text {
    font-size: 1rem;
    margin-bottom: 6px;
}

.limit-sub {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

.limit-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-outline {
    border: 1px solid #2563eb;
    color: #2563eb;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-outline:hover {
    background: #2563eb;
    color: #fff;
}

.limit-note {
    font-size: 0.75rem;
    color: #64748b;
}

/* UPGRADE */
.upgrade-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.upgrade-card {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.upgrade-sub {
    color: #94a3b8;
    margin-bottom: 20px;
}

.upgrade-price {
    margin: 20px 0;
}

.upgrade-price .price {
    font-size: 2.2rem;
    font-weight: 600;
}

.upgrade-price .period {
    font-size: 0.9rem;
    color: #94a3b8;
}

.upgrade-benefits {
    list-style: none;
    margin: 24px 0;
    text-align: left;
}

.upgrade-benefits li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.upgrade-actions form {
    margin-bottom: 12px;
}

.upgrade-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 12px;
}

/* ADS */
.ads-wrapper {
    margin: 40px auto;
    max-width: 100%;
    text-align: center;
}

.ads-wrapper ins {
    display: block;
    margin: 0 auto;
}

/* DASHBOARD */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.account-status {
    display: flex;
    gap: 12px;
    align-items: center;
}

.paid-until {
    font-size: 0.85rem;
    color: #94a3b8;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.history-table th,
.history-table td {
    padding: 10px;
    border-bottom: 1px solid #1e293b;
}

.history-table th {
    text-align: left;
    color: #94a3b8;
}

.empty {
    color: #94a3b8;
    font-size: 0.9rem;
}

.link-detail {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
}

.link-detail:hover {
    text-decoration: underline;
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.3px;
}

/* Premium */
.badge-premium {
    background: linear-gradient(135deg, #f5c542, #f59e0b);
    color: #1f2933;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

/* Free */
.badge-free {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px dashed rgba(148, 163, 184, 0.4);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #2a2a2a;
}

.admin-table th {
    text-align: left;
    color: #9ca3af;
    font-weight: 600;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-form {
    max-width: 420px;
    margin-top: 20px;
}

.admin-form .form-group {
    margin-bottom: 14px;
}

.admin-form label {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 8px 10px;
    background: #0f172a;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    border-radius: 6px;
}