:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --success: #06d6a0;
    --danger: #ef476f;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #212529;
    --text-secondary: #6c757d;
    --border: #e9ecef;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.btn.primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn.primary:hover::before {
    left: 100%;
}

.btn.primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.3);
}

.btn.primary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn.primary:hover span {
    gap: 10px;
}

.sort-arrows {
    display: inline-flex;
    flex-direction: column;
    margin-left: 8px;
    gap: 1px;
    vertical-align: middle;
}

.sort-arrow {
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    vertical-align: middle;
}

th:hover .sort-arrow {
    opacity: 0.5;
}

th:hover .sort-arrow.asc {
    transform: translateY(-1px);
}

th:hover .sort-arrow.desc {
    transform: translateY(1px);
}

th[data-sort] .sort-arrow.active {
    opacity: 1 !important;
    color: #4361ee !important;
    text-shadow: 0 1px 2px rgba(67, 97, 238, 0.3);
    transform: scale(1.2) !important;
}

.spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    color: white;
}

.spinner circle {
    stroke: currentColor;
    stroke-dasharray: 30;
    stroke-dashoffset: 0;
    transform-origin: center;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 30;
    }

    50% {
        stroke-dashoffset: 10;
    }

    100% {
        stroke-dashoffset: 30;
    }
}

@media (max-width: 768px) {
    .sort-arrows {
        margin-left: 4px;
    }

    .sort-arrow {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 768px) {
    .dashboard {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}