*,::before,::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#1f2937;background:#f1f5f9;min-height:100vh}

/* Layout */
.max-w-6xl{max-width:72rem}.mx-auto{margin:0 auto}.px-4{padding:0 1rem}.py-3{padding:.75rem 0}.py-6{padding:1.5rem 0}
.flex{display:flex}.justify-between{justify-content:space-between}.items-center{align-items:center}
.grid{display:grid}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.gap-6{gap:1.5rem}.gap-4{gap:1rem}.gap-3{gap:.75rem}.gap-2{gap:.5rem}
.block{display:block}.inline-block{display:inline-block}.inline-flex{display:inline-flex}

/* Navbar */
.navbar{background:#1e293b;color:#f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.15);position:sticky;top:0;z-index:50}
.navbar .inner{display:flex;flex-direction:row;justify-content:space-between;align-items:center;max-width:72rem;margin:0 auto;padding:0 1rem}
.navbar .logo{font-size:1.125rem;font-weight:700;color:#fff;text-decoration:none;padding:.75rem 0;display:inline-block}
.navbar .logo:hover{color:#94a3b8}
.nav-links{display:flex;gap:.25rem;align-items:center}
.nav-link{color:#cbd5e1;padding:.5rem .75rem;border-radius:.375rem;font-size:.875rem;font-weight:500;transition:all .15s;text-decoration:none}
.nav-link:hover{color:#fff;background:#334155;text-decoration:none}
.lang-switcher{display:inline-flex;gap:.125rem;align-items:center;margin-left:.5rem;padding-left:.5rem;border-left:1px solid #334155}
.lang-switcher .nav-link{padding:.25rem .5rem;font-size:.75rem}
.lang-switcher .lang-active{color:#fff;background:#4f46e5}

/* Cards */
.card{background:#fff;border-radius:.5rem;box-shadow:0 1px 3px rgba(0,0,0,.08);padding:1.5rem;border:1px solid #e2e8f0}
.card-header{font-weight:600;font-size:1.125rem;margin-bottom:.75rem}
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}
.card-clickable{transition:box-shadow .15s,border-color .15s,transform .15s;cursor:pointer}
.card-clickable:hover{box-shadow:0 4px 12px rgba(0,0,0,.12);border-color:#c7d2fe;transform:translateY(-1px)}

/* Stats boxes */
.stat-box{text-align:center;padding:1.5rem;background:#fff;border-radius:.5rem;border:1px solid #e2e8f0}
.stat-value{font-size:1.875rem;font-weight:700}.stat-label{font-size:.75rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em}

/* Typography */
.text-xl{font-size:1.25rem}.text-lg{font-size:1.125rem}.text-sm{font-size:.875rem}.text-xs{font-size:.75rem}
.font-bold{font-weight:700}.font-medium{font-weight:500}
.text-gray-500{color:#64748b}.text-gray-600{color:#475569}.text-gray-700{color:#334155}
.text-white{color:#fff}.text-center{text-align:center}
h1{font-size:1.5rem;font-weight:700;margin-bottom:1.5rem}
h2{font-size:1.125rem;font-weight:600;margin-bottom:1rem;color:#334155}

/* Buttons */
.btn{display:inline-flex;align-items:center;padding:.5rem 1rem;border-radius:.375rem;font-size:.875rem;font-weight:500;border:none;cursor:pointer;transition:all .15s;text-decoration:none;line-height:1.25rem}
.btn-primary{background:#6366f1;color:#fff}.btn-primary:hover{background:#4f46e5}
.btn-success{background:#22c55e;color:#fff}.btn-success:hover{background:#16a34a}
.btn-danger{background:#ef4444;color:#fff}.btn-danger:hover{background:#dc2626}
.btn-outline{background:transparent;color:#475569;border:1px solid #cbd5e1}.btn-outline:hover{background:#f1f5f9;border-color:#94a3b8}
.btn-sm{padding:.25rem .75rem;font-size:.75rem}.btn-xs{padding:.125rem .5rem;font-size:.6875rem}

/* Forms */
.form-group{margin-bottom:1rem}
.form-label{display:block;font-size:.875rem;font-weight:500;color:#334155;margin-bottom:.5rem}
.form-input,.form-select{width:100%;padding:.5rem .75rem;border:1px solid #cbd5e1;border-radius:.375rem;font-size:.875rem;background:#fff;transition:border-color .15s;color:#1e293b}
.form-input:focus,.form-select:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.15)}
.form-error{background:#fef2f2;border:1px solid #fca5a5;color:#b91c1c;padding:.75rem 1rem;border-radius:.375rem;margin-bottom:1rem;font-size:.875rem}

/* Auth pages */
.auth-card{max-width:24rem;margin:4rem auto 0;padding:2rem;background:#fff;border-radius:.5rem;border:1px solid #e2e8f0;box-shadow:0 4px 6px -1px rgba(0,0,0,.05)}
.auth-card h1{text-align:center;margin-bottom:1.5rem;color:#1e293b}
.auth-footer{text-align:center;font-size:.875rem;color:#64748b;margin-top:1.5rem}
.auth-footer a{color:#6366f1;font-weight:500;text-decoration:none}
.auth-footer a:hover{text-decoration:underline}

/* Content containers */
.content-wrapper{max-width:72rem;margin:0 auto;padding:1.5rem 1rem}
.section{margin-bottom:2rem}

/* Config items */
.config-item{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;border:1px solid #e2e8f0;border-radius:.375rem;margin-bottom:.5rem;background:#fff}
.config-item:hover{background:#f8fafc}
.config-name{font-weight:500;font-size:.875rem}
.config-meta{font-size:.75rem;color:#64748b;margin-left:.5rem}
.config-card{display:flex;flex-direction:column;padding:.75rem 1rem;border:1px solid #e2e8f0;border-radius:.375rem;margin-bottom:.5rem;background:#fff}
.config-card:hover{background:#f8fafc}

/* Badges */
.badge{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:9999px;font-size:.75rem;font-weight:500}
.badge-green{background:#dcfce7;color:#166534}
.badge-red{background:#fef2f2;color:#991b1b}
.badge-yellow{background:#fef9c3;color:#854d0e}
.badge-gray{background:#f1f5f9;color:#475569}
.badge-indigo{background:#eef2ff;color:#4338ca}
.badge-blue{background:#eff6ff;color:#1e40af}

/* Margins */
.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}
.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}
.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}
.mr-2{margin-right:.5rem}

/* Utility */
.border{border:1px solid #e2e8f0}.border-t{border-top:1px solid #e2e8f0}
.rounded-lg{border-radius:.5rem}.rounded{border-radius:.375rem}
.w-full{width:100%}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.p-4{padding:1rem}.p-3{padding:.75rem}

/* Status indicators */
.status-dot{display:inline-block;width:.5rem;height:.5rem;border-radius:50%;margin-right:.375rem}
.status-dot.on{background:#22c55e}.status-dot.off{background:#ef4444}

/* Extras */
.flex-wrap{flex-wrap:wrap}
.pt-3{padding-top:.75rem}
table td{vertical-align:middle}
.text-green-700{color:#15803d}.text-red-700{color:#b91c1c}

/* Admin sidebar nav */
.nav-item{display:block;padding:.5rem .75rem;border-radius:.375rem;font-size:.875rem;font-weight:500;color:#475569;text-decoration:none;transition:all .15s}
.nav-item:hover{background:#f1f5f9;color:#1e293b;text-decoration:none}
.nav-item.active{background:#eef2ff;color:#4338ca;font-weight:600}
.nav-item .badge{margin-left:.25rem}

/* Search input */
.search-input{width:100%;max-width:24rem;padding:.5rem .75rem;border:1px solid #cbd5e1;border-radius:.375rem;font-size:.875rem;transition:border-color .15s}
.search-input:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.15)}

/* Checkbox */
.form-checkbox{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:#334155;cursor:pointer}
.form-checkbox input[type="checkbox"]{width:1rem;height:1rem;accent-color:#6366f1}
