/* Reset, typography, buttons, utilities */

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

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    min-height: 100vh;
    font-size: var(--text-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-hover);
}

/* Status dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.status-dot.offline {
    background: var(--red);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.4rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: var(--text-md);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-dim);
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

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

.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: var(--text-sm);
}

.btn-danger {
    color: var(--red);
    border-color: var(--red-bg);
}

.btn-danger:hover {
    background: var(--red-bg);
    border-color: var(--red);
}

.btn-icon {
    padding: 0.375rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Form inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-md);
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-group {
    margin-bottom: var(--space-md);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Text utilities */
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-success { color: var(--green); }
.text-error { color: var(--red); }
.text-mono { font-family: var(--font-mono); }
.font-semibold { font-weight: 600; }
