/* Base Styles & Variables */
:root {
    --primary-color: #4F46E5; /* Indigo 600 */
    --primary-hover: #4338CA; /* Indigo 700 */
    --secondary-color: #6B7280; /* Gray 500 */
    --success-color: #10B981; /* Emerald 500 */
    --success-hover: #059669; /* Emerald 600 */
    --background: #F3F4F6; /* Gray 100 */
    --surface: #FFFFFF;
    --text-primary: #111827; /* Gray 900 */
    --text-secondary: #4B5563; /* Gray 600 */
    --border-color: #E5E7EB; /* Gray 200 */
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.app-header {
    background-color: var(--surface);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Controls Section */
.controls-section {
    background-color: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

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

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    min-width: 200px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select:disabled {
    background-color: var(--background);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

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

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

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

.btn-secondary:hover {
    background-color: #E5E7EB;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table */
.table-container {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    flex-grow: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #F9FAFB;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: #F9FAFB;
}

.data-table td {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.text-center {
    text-align: center;
}

/* Pagination */
.pagination-container {
    background-color: var(--surface);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

#current-page {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}
