/* Rybbit User Matching Panel - Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
}

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

/* Header */
header {
    background: white;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 20px;
}

header h1 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

header .subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Navigation & Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

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

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

.btn-success:hover {
    background: #15803d;
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

tr:hover {
    background: var(--gray-50);
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

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

/* Search & Filters */
.filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.filters .form-group {
    margin-bottom: 0;
}

.filters input[type="text"] {
    min-width: 250px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.pagination a:hover {
    background: var(--gray-50);
}

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

.pagination .disabled {
    color: var(--gray-300);
    cursor: not-allowed;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* User details */
.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 12px;
    background: var(--gray-50);
    border-radius: 6px;
}

.info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-item .value {
    font-weight: 500;
    color: var(--gray-900);
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .filters {
        flex-direction: column;
    }

    .filters input[type="text"] {
        min-width: 100%;
    }

    th, td {
        padding: 8px;
        font-size: 0.8rem;
    }

    .btn {
        padding: 8px 12px;
    }
}

/* Print styles */
@media print {
    .actions, .filters, .pagination, .btn {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
}
