/* Payment Recon Tool — Dashboard Styles */

:root {
    --primary: #0073bb;
    --primary-dark: #005a94;
    --success: #1d8102;
    --warning: #d13212;
    --warning-light: #ff9900;
    --danger: #d13212;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #16191f;
    --text-muted: #687078;
    --border: #e1e4e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

.nav-icon {
    font-size: 20px;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.auth-badge.connected {
    background: #e6f4ea;
    color: var(--success);
}

.auth-badge.disconnected {
    background: #fde8e8;
    color: var(--danger);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

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

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.warning {
    border-left: 4px solid var(--warning-light);
}

.stat-card.danger {
    border-left: 4px solid var(--danger);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

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

.table tr:hover {
    background: var(--bg);
}

.placeholder-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}

/* Severity Badges */
.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-high {
    background: #fde8e8;
    color: var(--danger);
}

.badge-medium {
    background: #fff3e0;
    color: #b8600a;
}

.badge-low {
    background: #e6f4ea;
    color: var(--success);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 187, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.select-sm {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-steps .step {
    font-size: 13px;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.progress-steps .step::before {
    content: "○";
    position: absolute;
    left: 0;
}

.progress-steps .step.active::before {
    content: "●";
    color: var(--primary);
}

.progress-steps .step.done::before {
    content: "✓";
    color: var(--success);
}

/* Docs Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.docs-grid .card-body h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.docs-grid .card-body ul,
.docs-grid .card-body ol {
    padding-left: 20px;
}

.docs-grid .card-body li {
    margin-bottom: 6px;
    font-size: 14px;
}

.docs-grid .card-body code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.docs-grid .card-body pre {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    margin-top: 8px;
}

.docs-grid .card-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.docs-grid .card-body a {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        margin-top: 8px;
        overflow-x: auto;
    }

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

    .docs-grid {
        grid-template-columns: 1fr;
    }
}
