:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent-color: #38bdf8;
    --error-color: #ef4444;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--card-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.nav-link.active {
    border-left: 3px solid var(--accent-color);
    padding-left: calc(1rem - 3px);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    max-width: 1200px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* FM-Style - Classic FileMaker look */
.fm-container {
    background-color: #f3f4f6;
    color: #000;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fm-header-row {
    background: #4b5563;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.fm-field-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.fm-label {
    background: #6b7280;
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.fm-input {
    background: white;
    border: 1px solid #9ca3af;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    color: black;
    border-radius: 2px;
}

.fm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.fm-table th {
    background: #374151;
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem;
    border: 1px solid #1f2937;
}

.fm-table td {
    background: white;
    border: 1px solid #d1d5db;
    padding: 0;
}

.fm-table input {
    width: 100%;
    border: none;
    padding: 0.3rem;
    font-size: 0.85rem;
    outline: none;
}

.card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-online { background-color: #10b981; box-shadow: 0 0 10px #10b981; }
.status-offline { background-color: var(--error-color); }

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}
