* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f7;
    margin: 0;
    color: #1a1a1a;
}

/* Login screen */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 36px; border-radius: 14px; width: 340px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.login-card h1 { font-size: 20px; margin: 0 0 20px; }

/* App shell */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topnav {
    background: #1a1a1a; color: #fff; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand { font-weight: 700; font-size: 16px; }
.brand .version { font-weight: 400; font-size: 12px; color: #999; margin-left: 8px; }
.nav-links a { color: #ddd; text-decoration: none; margin-left: 18px; font-size: 14px; }
.nav-links a:hover { color: #fff; }
.content { padding: 28px; max-width: 900px; margin: 0 auto; width: 100%; }
.muted { color: #666; font-size: 14px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=file] {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px;
}
button {
    margin-top: 16px; background: #e8622c; color: #fff; border: none;
    padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
button:hover { background: #cf5423; }
.btn-small { margin-top: 0; padding: 6px 12px; font-size: 13px; }
.btn-danger { background: #a12a1e; }
.btn-danger:hover { background: #841f16; }

.err { background: #fdecea; color: #a12a1e; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.ok { background: #eaf7ea; color: #1e7d1e; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

/* Cards / stats */
.card-grid { display: flex; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; flex: 1; min-width: 180px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.stat-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 6px; }

/* Panels + tables */
.panel { background: #fff; border-radius: 12px; padding: 22px; margin-top: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.panel h2 { font-size: 15px; margin: 0 0 14px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
.badge { padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-success { background: #eaf7ea; color: #1e7d1e; }
.badge-failed { background: #fdecea; color: #a12a1e; }
.badge-rolled_back { background: #fff4e0; color: #9a6300; }
