/* ============================================
   OSPREY - Modern CRE AI Platform
   ============================================ */

/* CSS Variables */
:root {
    --osprey-primary: #1e3a5f;
    --osprey-primary-hover: #152a45;
    --osprey-primary-light: #eff6ff;
    --osprey-accent: #e2e8f0;
    --osprey-accent-dark: #cbd5e1;
    --osprey-dark: #0f172a;
    --osprey-light: #f8fafc;
    --osprey-white: #ffffff;
    --osprey-border: #e2e8f0;
    --osprey-text: #334155;
    --osprey-text-light: #64748b;
    --osprey-text-muted: #94a3b8;
    --osprey-success: #10b981;
    --osprey-warning: #f59e0b;
    --osprey-error: #ef4444;
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    --transition: all 0.15s ease;
    
    --topbar-height: 56px;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    background: var(--osprey-light);
    color: var(--osprey-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ============================================
   App Layout
   ============================================ */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-height));
}

.content-area {
    padding: 20px 24px;
    flex: 1 0 auto;
}

/* ============================================
   Top Bar
   ============================================ */

.topbar {
    height: var(--topbar-height);
    background: var(--osprey-accent);
    border-bottom: 1px solid var(--osprey-accent-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--osprey-primary);
}

.logo-img {
    height: 40px;
    width: auto;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--osprey-primary);
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.topbar-nav .nav-link:hover {
    background: rgba(30, 58, 95, 0.1);
}

.topbar-nav .nav-link.active {
    background: var(--osprey-primary);
    color: white;
}

.topbar-nav .nav-link i {
    width: 16px;
    height: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(30, 58, 95, 0.1);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--osprey-primary);
}

.client-badge i {
    width: 14px;
    height: 14px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--osprey-primary);
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-menu:hover {
    background: rgba(30, 58, 95, 0.1);
    color: var(--osprey-primary);
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: var(--osprey-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.user-name {
    font-weight: 500;
    font-size: 13px;
}

.dropdown-icon {
    width: 14px;
    height: 14px;
    margin-right: 8px;
}

.dropdown-menu {
    font-size: 13px;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--osprey-white);
    border: 1px solid var(--osprey-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--osprey-border);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary {
    background: var(--osprey-primary);
    border-color: var(--osprey-primary);
}

.btn-primary:hover {
    background: var(--osprey-primary-hover);
    border-color: var(--osprey-primary-hover);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--osprey-primary);
    border-color: var(--osprey-primary);
}

.btn-outline-primary:hover {
    background: var(--osprey-primary);
    border-color: var(--osprey-primary);
}

/* ============================================
   Forms
   ============================================ */

.form-control {
    border: 1px solid var(--osprey-border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    transition: var(--transition);
    font-size: 13px;
}

.form-control:focus {
    border-color: var(--osprey-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-control-lg {
    padding: 10px 14px;
    font-size: 14px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--osprey-text);
    font-size: 13px;
}

.input-group-lg .form-control {
    font-size: 14px;
}

.input-group-lg .btn {
    font-size: 14px;
}

/* ============================================
   Login Page
   ============================================ */

.public-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--osprey-white);
    padding-bottom: 50px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--osprey-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--osprey-border);
}

.login-header {
    background: var(--osprey-accent);
    padding: 28px;
    text-align: center;
}

.login-header .logo-img {
    height: 64px;
    width: auto;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--osprey-text-light);
    margin: 6px 0 0 0;
    font-size: 13px;
}

.login-body {
    padding: 28px;
}

.login-body .form-control {
    padding: 10px 14px;
}

.login-body .btn-primary {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 10px 16px;
    font-size: 13px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.alert-info {
    background: var(--osprey-primary-light);
    color: #1e40af;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
}

.alert-danger, .alert-error {
    background: #fef2f2;
    color: #991b1b;
}

/* ============================================
   Tables
   ============================================ */

.table {
    font-size: 13px;
}

.table th {
    font-weight: 600;
    color: var(--osprey-text);
}

/* ============================================
   Badges
   ============================================ */

.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* ============================================
   Footer
   ============================================ */

.app-footer {
    padding: 16px 24px;
    text-align: center;
    color: var(--osprey-text-muted);
    font-size: 12px;
    border-top: 1px solid var(--osprey-border);
    background: var(--osprey-white);
    flex-shrink: 0;
}

.public-container + .app-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    border: none;
}

/* ============================================
   Utilities
   ============================================ */

.text-muted {
    color: var(--osprey-text-light) !important;
}

.text-primary {
    color: var(--osprey-primary) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--osprey-text);
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

small, .small {
    font-size: 12px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 992px) {
    .topbar-nav {
        display: none;
    }
    
    .client-badge {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: var(--osprey-text);
}

.page-subtitle {
    font-size: 13px;
    color: var(--osprey-text-light);
    margin: 4px 0 0 0;
}

/* ============================================
   User Avatars (various sizes)
   ============================================ */

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--osprey-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    background: var(--osprey-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================
   Breadcrumbs
   ============================================ */

.breadcrumb {
    font-size: 12px;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--osprey-text-light);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--osprey-primary);
}

.breadcrumb-item.active {
    color: var(--osprey-text-muted);
}