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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f1117;
    color: #e1e4e8;
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    background: linear-gradient(135deg, #1a1e2e 0%, #2d1b69 100%);
    padding: 32px 0;
    border-bottom: 1px solid #30363d;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

header .subtitle {
    color: #8b949e;
    font-size: 14px;
    margin-top: 4px;
}

nav {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.nav-btn {
    background: none;
    border: none;
    color: #8b949e;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: #e1e4e8;
}

.nav-btn.active {
    color: #58a6ff;
    border-bottom-color: #58a6ff;
}

main {
    padding: 24px 0 60px;
}

.section {
    animation: fadeIn 0.2s ease;
}

.hidden {
    display: none !important;
}

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

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #f0f6fc;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f0f6fc;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    color: #e1e4e8;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="date"],
select {
    padding: 8px 12px;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #0d1117;
    color: #e1e4e8;
    font-size: 14px;
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: #58a6ff;
}

label {
    font-size: 13px;
    color: #8b949e;
    margin-bottom: 4px;
    display: block;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #238636;
    color: #fff;
}

.btn-primary:hover {
    background: #2ea043;
}

.btn-primary:disabled {
    background: #21262d;
    color: #484f58;
    cursor: not-allowed;
}

.btn-small {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-copy {
    background: #30363d;
    color: #e1e4e8;
}

.btn-copy:hover {
    background: #484f58;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px dashed #30363d;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
    font-size: 14px;
}

.file-label:hover {
    border-color: #58a6ff;
}

.file-name {
    font-size: 13px;
    color: #8b949e;
}

.divider {
    text-align: center;
    position: relative;
    margin: 8px 0;
}

.divider span {
    background: #0f1117;
    padding: 0 12px;
    color: #484f58;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #30363d;
    z-index: -1;
}

.loading {
    padding: 16px;
    text-align: center;
    color: #58a6ff;
    font-size: 14px;
}

.loading::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #58a6ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    padding: 12px 16px;
    background: #3d1a1a;
    border: 1px solid #f85149;
    border-radius: 8px;
    color: #f85149;
    font-size: 14px;
    margin-top: 12px;
}

.result-card {
    margin-top: 20px;
    padding: 20px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #1f6feb;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.parsed-section {
    margin-top: 12px;
}

.parsed-section h4 {
    font-size: 13px;
    color: #58a6ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.parsed-section ul {
    list-style: none;
    padding: 0;
}

.parsed-section li {
    padding: 4px 0;
    font-size: 14px;
    color: #c9d1d9;
    border-bottom: 1px solid #21262d;
}

.parsed-section li:last-child {
    border-bottom: none;
}

.skill-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #1b3a4b;
    color: #58a6ff;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
}

.skill-tag.missing {
    background: #3d1a1a;
    color: #f85149;
}

.skill-tag.matched {
    background: #1b3d2a;
    color: #3fb950;
}

.id-inputs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.id-inputs div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.id-inputs input {
    width: 100px;
}

.id-inputs input[type="url"] {
    width: 250px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    border: 4px solid;
    transition: all 0.5s;
}

.score-label {
    margin-top: 8px;
    font-size: 14px;
    color: #8b949e;
}

.match-details {
    margin-top: 16px;
}

.asset-card {
    margin-top: 16px;
    padding: 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
}

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

.asset-card .copyable {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.7;
    color: #c9d1d9;
}

.json-display {
    background: #0d1117;
    padding: 12px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    overflow-x: auto;
}

.tracker-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row input, .form-row select {
    flex: 1;
    min-width: 120px;
}

.tracker-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: left;
    padding: 10px 12px;
    background: #161b22;
    color: #8b949e;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #30363d;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #21262d;
    color: #c9d1d9;
}

tr:hover td {
    background: #161b22;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-saved { background: #1f2937; color: #9ca3af; }
.status-applied { background: #1e3a5f; color: #60a5fa; }
.status-interview { background: #3b2f1b; color: #fbbf24; }
.status-offer { background: #1b3d2a; color: #3fb950; }
.status-rejected { background: #3d1a1a; color: #f85149; }

.status-select {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #e1e4e8;
}

.checklist {
    margin-bottom: 20px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
    font-size: 14px;
}

.checklist-icon {
    font-size: 18px;
}

.checklist-item a {
    color: #58a6ff;
    text-decoration: none;
}

.checklist-item a:hover {
    text-decoration: underline;
}

.assist-info {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #94a3b8;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 10px 20px;
    background: #238636;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    transition: opacity 0.3s;
}

footer {
    padding: 20px 0;
    border-top: 1px solid #21262d;
    text-align: center;
    font-size: 13px;
    color: #484f58;
}

.settings-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
}

.settings-card .form-field {
    margin-bottom: 12px;
}

.settings-card .form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #c9d1d9;
}

.settings-card .form-field input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e1e4e8;
    font-size: 14px;
}

.settings-card .form-field input[type="email"]:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.settings-card .field-hint {
    display: block;
    font-size: 12px;
    color: #8b949e;
    margin-top: 4px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #c9d1d9;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #58a6ff;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.stat-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #58a6ff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #8b949e;
}

.status-breakdown {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 14px;
    color: #c9d1d9;
}

.status-badge .count {
    font-weight: 700;
    color: #58a6ff;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-users-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #30363d;
    color: #8b949e;
    font-weight: 600;
}

.admin-users-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #21262d;
    color: #c9d1d9;
}

.admin-users-table tr:hover td {
    background: #161b22;
}

.notif-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.notif-dot.on { background: #3fb950; }
.notif-dot.off { background: #484f58; }

@media (max-width: 640px) {
    .id-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    .id-inputs input, .id-inputs input[type="url"] {
        width: 100%;
    }
    .form-row {
        flex-direction: column;
    }
    nav .container {
        gap: 0;
    }
    .nav-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}
