/* === GLOBAL LAYOUT === */
body {
    background-color: #0b1220;
    color: #f3f4f6;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === HEADER & NAV === */
header {
    background: #111827;
    border-bottom: 1px solid #1f2937;
    padding: 10px 0;
}

header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f9fafb;
}

.nav a {
    margin-left: 16px;
    font-weight: 500;
    color: #9ca3af;
}

.nav a:hover {
    color: #f9fafb;
}

/* === CONTAINER === */
.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}

/* === TOOLBAR === */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.toolbar h2,
.toolbar h3 {
    margin: 0;
}

.badge {
    background: #1f2937;
    color: #9ca3af;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
}

/* === CARDS === */
.card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* === FORM ELEMENTS === */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

input, select, textarea, button {
    font-family: inherit;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
    width: 100%;
    background: #0b1220;
    border: 1px solid #1f2937;
    border-radius: 8px;
    color: #f3f4f6;
    padding: 8px 10px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* === BUTTONS === */
button {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

button.primary {
    background: #3b82f6;
    color: white;
}

button.primary:hover {
    background: #2563eb;
}

button.danger {
    background: #dc2626;
    color: white;
}

button.danger:hover {
    background: #b91c1c;
}

/* === ROW & GRID === */
.row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.col {
    flex: 1;
    min-width: 240px;
}

.help {
    color: #9ca3af;
    font-size: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* === ALERTS === */
.alert {
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
}

.alert.success {
    background: #14532d;
    color: #a7f3d0;
}

.alert.error {
    background: #7f1d1d;
    color: #fecaca;
}

.hidden {
    display: none !important;
}

/* === TABLES === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

th, td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #1f2937;
}

th {
    color: #9ca3af;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover {
    background: #1f2937;
}

/* === MODALS === */
.modal-overlay.show {
    display: flex !important;
}

.modal button.primary {
    font-size: 13px;
    padding: 6px 10px;
}

/* === TAB STYLING === */
.tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #1f2937;
    margin-bottom: 12px;
}

.tab {
    padding: 8px 12px;
    border: 1px solid #1f2937;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
}

.tab.active {
    background: #1f2937;
    font-weight: 600;
}

/* === LIST STYLING === */
.list {
    display: grid;
    gap: 10px;
}

.rowline {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 8px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* === FOOTER === */
footer {
    text-align: center;
    color: #9ca3af;
    border-top: 1px solid #1f2937;
    padding: 12px;
    font-size: 13px;
}
.badge {
    background: #1f2937;
    color: #f9fafb;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 8px;
    display: inline-block;
}


/* Shared nav styles */
.nav{
    position:sticky;
    top:0;
    z-index:40;
    background:rgba(11,12,16,.8);
    backdrop-filter:saturate(160%) blur(10px);
    border-bottom:1px solid var(--border);
    padding-top: env(safe-area-inset-top);
}
.nav .inner{
    max-width:980px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 12px;
}
.logo{display:flex;align-items:center;gap:10px;font-weight:800}
.logo-badge{
    display:inline-grid;
    place-items:center;
    width:28px;height:28px;
    border-radius:8px;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    color:#111;
}
.nav a.btn{
    padding:10px 14px;
    border:1px solid var(--border);
    border-radius:12px;
    color:var(--text);
    text-decoration:none;
}
.nav a.btn:hover { text-decoration: underline; }
