/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
       font-size: 15px; background: #f5f6fa; color: #1a1a2e; line-height: 1.5; }
a { color: #4f46e5; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navbar */
.navbar { background: #1a1a2e; color: #fff; display: flex;
          align-items: center; justify-content: space-between;
          padding: 0 2rem; height: 56px; }
.nav-brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -.5px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a, .btn-link { color: #a5b4fc; background: none;
                           border: none; cursor: pointer; font-size: 15px; }
.nav-links a:hover, .btn-link:hover { color: #fff; text-decoration: none; }

/* Container */
.container { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }

/* Auth pages */
.auth-page { display: flex; align-items: center; justify-content: center;
             min-height: 100vh; background: #f5f6fa; }
.auth-card { background: #fff; border-radius: 12px; padding: 2.5rem;
             width: 100%; max-width: 400px;
             box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.auth-logo { font-size: 1.4rem; font-weight: 800; color: #4f46e5;
             margin-bottom: 1.5rem; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: .5rem; }
.auth-hint { color: #6b7280; margin-bottom: 1.5rem; font-size: .9rem; }
.auth-back { display: block; text-align: center; margin-top: 1.25rem;
             color: #6b7280; font-size: .9rem; }

/* Forms */
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .875rem; }
.field input, .field textarea, .field select {
    width: 100%; padding: .6rem .85rem; border: 1.5px solid #e5e7eb;
    border-radius: 8px; font-size: 15px; transition: border .2s; background: #fff; }
.field input:focus, .field textarea:focus {
    outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.field-hint { font-size: .8rem; color: #6b7280; margin-top: .3rem; display: block; }
.input-group { display: flex; gap: .5rem; }
.input-group input { flex: 1; }
.form-card { background: #fff; padding: 2rem; border-radius: 12px;
             box-shadow: 0 2px 12px rgba(0,0,0,.06); max-width: 640px; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem;
       padding: .55rem 1.1rem; border-radius: 8px; font-size: .875rem;
       font-weight: 600; border: none; cursor: pointer; transition: all .15s; }
.btn-primary   { background: #4f46e5; color: #fff; }
.btn-primary:hover   { background: #4338ca; }
.btn-secondary { background: #f3f4f6; color: #374151; border: 1.5px solid #e5e7eb; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-success   { background: #059669; color: #fff; }
.btn-success:hover   { background: #047857; }
.btn-danger    { background: #fff; color: #dc2626; border: 1.5px solid #fca5a5; }
.btn-danger:hover    { background: #fef2f2; }
.btn-sm  { padding: .35rem .75rem; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; padding: .75rem; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .9rem; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.alert-success { background: #f0fdf4; color: #059669; border: 1px solid #86efac; }

/* Page header */
.page-header { display: flex; align-items: center;
               justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.4rem; font-weight: 700; }

/* Sites table */
.sites-table { width: 100%; background: #fff; border-radius: 12px;
               box-shadow: 0 2px 12px rgba(0,0,0,.06);
               border-collapse: collapse; overflow: hidden; }
.sites-table thead { background: #f9fafb; }
.sites-table th { padding: .85rem 1rem; text-align: left;
                  font-size: .8rem; text-transform: uppercase;
                  letter-spacing: .05em; color: #6b7280;
                  border-bottom: 1.5px solid #f3f4f6; }
.sites-table td { padding: .85rem 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.sites-table tr:last-child td { border-bottom: none; }
.sites-table tr:hover td { background: #fafafa; }
.site-name { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.favicon { width: 20px; height: 20px; border-radius: 4px; }
.actions { display: flex; gap: .5rem; }

/* Status */
.status { font-size: .85rem; font-weight: 600; }
.badge { font-size: .7rem; padding: .2rem .5rem; border-radius: 99px; font-weight: 600; }
.badge-info { background: #ede9fe; color: #6d28d9; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem;
               background: #fff; border-radius: 12px;
               box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.empty-state p { color: #6b7280; margin-bottom: 1.25rem; }

/* Info box */
.info-box { margin-top: 2rem; padding: 1.5rem; background: #eff6ff;
            border-radius: 12px; border: 1px solid #bfdbfe; max-width: 640px; }
.info-box h3 { margin-bottom: .75rem; font-size: 1rem; }
.info-box ol { padding-left: 1.25rem; }
.info-box li { margin-bottom: .5rem; color: #374151; }
.info-box code { background: #dbeafe; padding: .1rem .4rem; border-radius: 4px; font-size: .875rem; }
