:root {
    --brand-primary: #4378c1;
    --brand-primary-dark: #345f96;
    --brand-accent: #6ea8dc;
    --brand-bg: #f4f6f8;
    --sidebar-width: 240px;
    --bottom-nav-height: 64px;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--brand-bg);
    color: #1f2937;
}

/* Cegah Safari iOS zoom otomatis saat fokus ke input (butuh font-size >= 16px) */
input, select, textarea {
    font-size: 16px;
}

.btn {
    min-height: 44px;
}

.navbar-brand {
    font-weight: 700;
    color: var(--brand-primary) !important;
}

.app-shell {
    display: flex;
    min-height: 100dvh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.app-sidebar .nav-link {
    color: #374151;
    border-radius: 0.5rem;
    padding: 0.65rem 0.9rem;
    font-weight: 500;
}

.app-sidebar .nav-link.active {
    background-color: var(--brand-primary);
    color: #fff;
}

.app-sidebar .nav-link.disabled {
    color: #9ca3af;
}

.app-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + var(--bottom-nav-height));
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-link {
    flex: 1;
    text-align: center;
    color: #6b7280;
    font-size: 0.72rem;
    padding: 0.4rem 0.1rem;
}

.bottom-nav .nav-link.active {
    color: var(--brand-primary);
    font-weight: 600;
}

.card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.logo-preview {
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
    border: 1px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: #fff;
}

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
}

@media (max-width: 767.98px) {
    .app-sidebar {
        display: none;
    }

    .app-content {
        padding: 1rem;
    }
}
