* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

a {
    color: #0f5cc0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #111827;
    color: #f9fafb;
    padding: 24px 18px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.brand-logo {
    width: 200px;
    height: 200px;
    background-image: url('/assets/VaentupaLogo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex: 0 0 200px;
}

.brand-text-group {
    min-width: 0;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
}

.user-box {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 24px;
}

.user-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.user-name {
    font-weight: 700;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.nav-link {
    display: block;
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 8px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

.nav-link.active {
    background: #2563eb;
    color: #ffffff;
}

.logout-form {
    margin-top: 24px;
}

.content {
    padding: 28px;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
    font-size: 30px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

textarea {
    min-height: 110px;
}

.form-row {
    margin-bottom: 14px;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-secondary {
    background: #374151;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-full {
    width: 100%;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.alert-info {
    background: #dbeafe;
    color: #1e3a8a;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

th {
    background: #f9fafb;
    font-size: 14px;
}

code, pre {
    font-family: Consolas, Monaco, monospace;
}

pre {
    white-space: pre-wrap;
    margin: 0;
}

.inline-form {
    display: inline;
}

.muted {
    color: #6b7280;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding-bottom: 8px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .brand {
        margin-bottom: 18px;
    }

    .brand-logo {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .brand-title {
        font-size: 22px;
    }
}