:root {
    --primary: #263c7a;
    --primary-dark: #1a2a5c;
    --primary-light: #e8ecf5;
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

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

/* NAVBAR */
.navbar {
    background: #263c7a;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    white-space: nowrap;
}

.nav-credits {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.credit-item {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white !important;
}

/* CONTAINER */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* CARD */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* STATS SUMMARY */
.stats-summary {
    background: var(--primary-light);
    border: 1px solid rgba(38, 60, 122, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-summary h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.stat-box {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-box .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-box .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* HEADINGS */
h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* FORM */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* TABLE */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.table th, .table td {
    padding: 0.5rem 0.4rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

.table .url-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table .content-cell,
.table .hashtags-cell {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* BADGE */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* PROGRESS */
.progress {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

/* TABS */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

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

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* NOTICE */
.notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

/* STAT ITEMS */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.stat-item .label { color: var(--text-muted); }
.stat-item .value { font-weight: 600; }

/* STATS COMPACT - inline row */
.stats-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
}

.stats-compact .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
}

.stats-compact .stat-item .label {
    font-size: 0.85rem;
}

.stats-compact .stat-item .value {
    font-size: 0.95rem;
}

/* TEXT UTILITIES */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; gap: 1rem; }
    .container { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
