@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --secondary: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-focus: #38bdf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    --shadow-lg: 0 12px 20px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Containers with Sticky Sidebars & Fixed Viewport */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 270px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.25rem;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.015);
    overflow-y: auto;
    z-index: 20;
}

.main-content {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

/* Brand Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.25rem 0.25rem 1.25rem 0.25rem;
    text-decoration: none;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.25rem;
}

.brand-icon {
    width: 46px;
    height: 46px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 5px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.1;
    font-family: var(--font-brand, 'Outfit', sans-serif);
}

.brand-tagline {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 0.15rem;
    line-height: 1.3;
}

/* Navigation Links */
.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--primary);
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.35rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: white;
    border-color: var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

/* Cards & Panels */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: all 0.25s ease;
}

/* Header User Profile Bar */
.topbar {
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2.5rem 0.75rem 2rem;
    box-sizing: border-box;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.45rem 0.95rem 0.45rem 0.65rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    margin-right: 0.5rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #0284c7;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
}

.user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.875rem 1.35rem;
    border-radius: var(--radius-md);
    background: #0f172a;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
