:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --online: #22c55e;
    --offline: #ef4444;
    --syncing: #eab308;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.online {
    background: rgba(34, 197, 94, 0.1);
    color: var(--online);
    border: 1px solid var(--online);
}

.online .status-dot {
    background: var(--online);
    box-shadow: 0 0 10px var(--online);
}

.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--offline);
    border: 1px solid var(--offline);
}

.offline .status-dot {
    background: var(--offline);
}

.syncing {
    background: rgba(234, 179, 8, 0.1);
    color: var(--syncing);
    border: 1px solid var(--syncing);
}

.syncing .status-dot {
    background: var(--syncing);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

input,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
}

button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: var(--primary-hover);
}

button:active {
    transform: translateY(1px);
}

.items-list {
    margin-top: 1.5rem;
}

.item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-content {
    flex: 1;
}

.item-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 1rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
}

.btn-edit {
    color: #60a5fa;
}

.btn-delete {
    color: #f87171;
}

.search-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.search-input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.mock-fetch-btn {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.4);
    margin-bottom: 1rem;
}

.status-pending {
    background: rgba(234, 179, 8, 0.2);
    color: var(--syncing);
}

.status-synced {
    background: rgba(34, 197, 94, 0.2);
    color: var(--online);
}

/* Pagination & Scaling Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-btn {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.progress-container {
    height: 4px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 2px;
    margin: 1rem 0;
    overflow: hidden;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    background: var(--online);
    width: 0%;
    transition: width 0.3s ease;
}