/* Global site styling and footer/version display */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    color: #1b2b3a;
}

.page {
    min-height: 100vh;
    padding-bottom: 48px; /* space for footer */
}

/* Footer styling */
.app-footer {
    position: fixed;
    right: 12px;
    bottom: 8px;
    font-size: 12px;
    color: rgba(27,43,58,0.75);
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(27,43,58,0.06);
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(20,30,40,0.06);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-footer .tenant {
    font-weight: 600;
    color: #133e5e;
}

.app-footer .version {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;
    color: #2b6cb0;
}

@media (max-width: 640px) {
    .app-footer {
        left: 8px;
        right: 8px;
        bottom: 8px;
        justify-content: space-between;
        font-size: 12px;
    }
}

/* Layout helpers */
.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h1 {
    font-size: 20px;
    margin: 0;
    color: #133e5e;
}

.nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav a {
    color: #133e5e;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav a:hover {
    background: rgba(19,62,94,0.06);
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(20,30,40,0.04);
    border: 1px solid rgba(27,43,58,0.04);
}

.card + .card {
    margin-top: 12px;
}

/* Typography */
h2, h3, h4 {
    color: #133e5e;
    margin: 0 0 8px 0;
}

p { margin: 0 0 10px 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(180deg,#1e5f95 0%, #133e5e 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(19,62,94,0.18);
}

.btn-secondary {
    background: #e9f0fb;
    color: #133e5e;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Forms */
label { display:block; margin-bottom:6px; font-weight:600; color:#2b3e50; }

input[type="text"], input[type="password"], input[type="email"], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(27,43,58,0.12);
    box-sizing: border-box;
    background: #fff;
}

textarea { min-height: 120px; }

.form-row { margin-bottom: 12px; }

/* Alerts */
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.alert-success { background: #e6f8ef; color: #1f6f3a; border: 1px solid rgba(31,111,58,0.08); }
.alert-error { background: #fff1f0; color: #8b1d1d; border: 1px solid rgba(139,29,29,0.06); }
.alert-info { background: #eef6ff; color: #184a8a; border: 1px solid rgba(24,74,138,0.06); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid rgba(27,43,58,0.06); text-align: left; }
th { background: rgba(19,62,94,0.03); }

/* Responsive tweaks */
@media (max-width: 900px) {
    .container { padding: 0 12px; }
    .brand h1 { font-size: 18px; }
}

@media (max-width: 640px) {
    .nav { display: none; }
    .brand h1 { font-size: 16px; }
    .container { margin: 12px; }
}

/* Utility classes */
.muted { color: rgba(27,43,58,0.6); }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mt-2 { margin-top: 16px; }

