/* CSS Variables */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --bg: #ecfdf5;
    --bg-dark: #d1fae5;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --yellow-500: #f59e0b;
    --yellow-100: #fef3c7;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --purple-500: #8b5cf6;
    --purple-100: #ede9fe;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.ai-badge {
    font-size: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: super;
}

.nav-menu {
    padding: 16px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    margin-bottom: 4px;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-item.active {
    background: var(--bg);
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.ai-pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.header-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 4px;
}

.header-right {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-icon.active-deals {
    background: var(--bg);
    color: var(--primary);
}

.stat-icon.at-risk {
    background: var(--red-100);
    color: var(--red-500);
}

.stat-icon.insights {
    background: var(--blue-100);
    color: var(--blue-500);
}

.stat-icon.wins {
    background: var(--purple-100);
    color: var(--purple-500);
}

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-trend svg {
    width: 16px;
    height: 16px;
}

.stat-trend.up {
    color: var(--primary);
}

.stat-trend.down {
    color: var(--red-500);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

/* Deals Section */
.deals-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover {
    background: var(--gray-200);
}

.filter-tab.active {
    background: var(--primary);
    color: var(--white);
}

/* Deals List */
.deals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deal-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.deal-card:hover {
    background: var(--bg);
    border-color: var(--primary-light);
}

.deal-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    margin-right: 16px;
}

.deal-info {
    flex: 1;
}

.deal-company {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.deal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.deal-value {
    font-weight: 600;
    color: var(--primary-dark);
}

.deal-stage {
    padding: 2px 8px;
    background: var(--bg);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.deal-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.score-badge {
    font-size: 1.25rem;
    font-weight: 700;
}

.score-badge.high {
    color: var(--primary);
}

.score-badge.medium {
    color: var(--yellow-500);
}

.score-badge.low {
    color: var(--red-500);
}

.score-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* AI Panel */
.ai-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    color: var(--white);
}

.ai-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-header-icon svg {
    width: 24px;
    height: 24px;
}

.ai-panel-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.deal-scores {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.score-item:last-child {
    border-bottom: none;
}

.score-deal-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.score-deal-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.score-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-bar {
    width: 60px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.score-bar-fill.high {
    background: var(--primary);
}

.score-bar-fill.medium {
    background: var(--yellow-500);
}

.score-bar-fill.low {
    background: var(--red-500);
}

.score-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    min-width: 36px;
    text-align: right;
}

/* AI Insights Section */
.ai-insights-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.ai-insights-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.ai-insights-section h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card {
    padding: 16px;
    border-radius: var(--radius);
    border-left: 4px solid;
    cursor: pointer;
    transition: var(--transition);
}

.insight-card:hover {
    transform: translateX(4px);
}

.insight-card.opportunity {
    background: var(--bg);
    border-left-color: var(--primary);
}

.insight-card.warning {
    background: var(--yellow-100);
    border-left-color: var(--yellow-500);
}

.insight-card.risk {
    background: var(--red-100);
    border-left-color: var(--red-500);
}

.insight-card.info {
    background: var(--blue-100);
    border-left-color: var(--blue-500);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.insight-icon {
    width: 24px;
    height: 24px;
}

.insight-card.opportunity .insight-icon {
    color: var(--primary);
}

.insight-card.warning .insight-icon {
    color: var(--yellow-500);
}

.insight-card.risk .insight-icon {
    color: var(--red-500);
}

.insight-card.info .insight-icon {
    color: var(--blue-500);
}

.insight-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-card.opportunity .insight-type {
    color: var(--primary-dark);
}

.insight-card.warning .insight-type {
    color: var(--yellow-500);
}

.insight-card.risk .insight-type {
    color: var(--red-500);
}

.insight-card.info .insight-type {
    color: var(--blue-500);
}

.insight-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.insight-deal {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Deal Detail View */
.deal-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.deal-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.deal-detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
}

.deal-detail-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.deal-detail-info p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.competitor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--red-100);
    color: var(--red-500);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.ai-recommendation {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.ai-recommendation h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.ai-recommendation h4 svg {
    width: 16px;
    height: 16px;
}

.ai-recommendation p {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Responsive */






/* Back to Home Button */
.back-home{display:inline-flex;align-items:center;gap:8px;padding:12px 20px;margin:16px;background:#0a0a0a;border-radius:6px;color:#fff;text-decoration:none;transition:all .2s}
.back-home:hover{background:#5ae6a8;color:#0a0a0a}
.back-home svg{width:16px;height:16px;flex-shrink:0}
.back-home .logo-text{font-family:'Cormorant Garamond',Georgia,serif;font-size:18px;font-weight:500;white-space:nowrap}
.back-home em{font-style:normal;color:#5ae6a8}
.back-home:hover em{color:#0a0a0a}

/* Enhanced Mobile Responsiveness */

/* Tablet breakpoint */

/* Mobile breakpoint */

/* Small mobile breakpoint */

/* Hamburger toggle button */
/* Overlay */

/* ========== MOBILE TOP NAVIGATION ========== */

@media (max-width: 1200px) {
  .content-grid {
    grid-template-columns: 1fr !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 900px) {
  /* Hide sidebar on mobile - will use top nav instead */
  .sidebar {
    display: none !important;
  }

  /* Main content takes full width */
  .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .app-container {
    flex-direction: column !important;
  }
}

@media (max-width: 768px) {
  /* Back home button */
  .back-home {
    margin: 8px 12px !important;
    padding: 10px 14px !important;
  }

  /* Header styling for top navigation */
  .header {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px !important;
    gap: 12px !important;
    height: auto !important;
  }

  .header-left {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* Logo */
  .logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .logo-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .logo-text {
    font-size: 16px !important;
  }

  .logo-text h1 {
    font-size: 16px !important;
  }

  .tagline {
    font-size: 9px !important;
  }

  /* Navigation - horizontal scrolling tabs at top */
  .nav, .nav-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding: 8px 0 !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .nav::-webkit-scrollbar,
  .nav-menu::-webkit-scrollbar {
    display: none !important;
  }

  .nav-link, .nav-item, .nav-btn {
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    text-align: center !important;
  }

  /* Hide header right on mobile */
  .header-right, .header-actions {
    display: none !important;
  }

  /* Page header */
  .page-header, .view-header {
    margin-bottom: 16px !important;
  }

  .page-header h1, .page-title, .view-header h2 {
    font-size: 20px !important;
  }

  .page-header p, .page-subtitle, .view-header p {
    font-size: 13px !important;
  }

  /* Main content */
  .main, .main-content {
    padding: 12px !important;
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card {
    padding: 14px !important;
    gap: 10px !important;
  }

  .stat-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .stat-value {
    font-size: 22px !important;
  }

  .stat-label {
    font-size: 12px !important;
  }

  .stat-trend {
    font-size: 11px !important;
    padding: 3px 6px !important;
  }

  /* Content grid */
  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Panels */
  .panel, .ai-panel, .contacts-panel, .deals-panel, .activities-panel {
    margin-bottom: 12px !important;
  }

  .panel-header {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .panel-header h2 {
    font-size: 14px !important;
  }

  /* AI panel specific */
  .ai-status {
    padding: 14px !important;
    flex-direction: column !important;
    text-align: center !important;
  }

  .ai-capabilities {
    padding: 12px !important;
  }

  .ai-capabilities li {
    font-size: 13px !important;
    padding: 5px 0 !important;
  }

  .ai-metrics {
    padding: 12px !important;
  }

  .ai-content {
    padding: 12px !important;
    gap: 10px !important;
  }

  .ai-suggestion {
    padding: 12px !important;
    gap: 10px !important;
    flex-direction: column !important;
  }

  .ai-suggestion-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .ai-suggestion-content h4 {
    font-size: 14px !important;
  }

  .ai-suggestion-content p {
    font-size: 12px !important;
  }

  /* Lists */
  .contracts-list, .reviews-list, .contacts-list,
  .deals-pipeline, .activities-list {
    max-height: 280px !important;
  }

  .contract-item, .review-item, .contact-item,
  .deal-item, .activity-item {
    padding: 12px !important;
    gap: 10px !important;
  }

  .contract-name, .contact-name, .deal-name {
    font-size: 13px !important;
  }

  .contract-meta, .contact-company, .deal-company {
    font-size: 11px !important;
  }

  .contact-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
  }

  .deal-stage {
    width: 6px !important;
    height: 36px !important;
  }

  .deal-value {
    font-size: 15px !important;
  }

  .activity-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .activity-title {
    font-size: 13px !important;
  }

  .activity-meta {
    font-size: 11px !important;
  }

  /* Status badges */
  .status-badge, .badge, .contract-status, .contact-status {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }

  /* Risk flags */
  .risk-flags {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .risk-flag {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }

  /* Filter bar */
  .filter-bar {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding-bottom: 8px !important;
  }

  .filter-btn {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Grids */
  .contracts-grid, .templates-grid, .providers-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .template-card, .provider-card {
    padding: 14px !important;
  }

  .template-card h3, .provider-card h3 {
    font-size: 15px !important;
  }

  /* Settings */
  .settings-container {
    gap: 12px !important;
  }

  .settings-section {
    padding: 14px !important;
  }

  .settings-section h3 {
    font-size: 15px !important;
  }

  .setting-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 0 !important;
  }

  .setting-item label {
    font-size: 13px !important;
  }

  .setting-desc {
    font-size: 11px !important;
  }

  .setting-item select,
  .setting-item .btn {
    width: 100% !important;
  }

  /* Forms */
  .form-group {
    margin-bottom: 14px !important;
  }

  .form-group label {
    font-size: 13px !important;
  }

  .form-group input,
  .form-group select,
  .form-group textarea,
  .form-control,
  .search-input {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .file-upload {
    padding: 20px !important;
  }

  .file-upload svg {
    width: 32px !important;
    height: 32px !important;
  }

  .priority-select {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .form-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .form-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Modal */
  .modal-overlay {
    padding: 12px !important;
    align-items: flex-start !important;
    padding-top: 20px !important;
  }

  .modal {
    max-width: 100% !important;
    max-height: calc(100vh - 40px) !important;
  }

  .modal-header {
    padding: 14px 16px !important;
  }

  .modal-header h2, .modal-header h3 {
    font-size: 16px !important;
  }

  .modal-body, .upload-form, #contactForm {
    padding: 16px !important;
  }

  .modal-footer {
    padding: 12px 16px !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Buttons */
  .btn {
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

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

  .btn-outline {
    padding: 6px 12px !important;
  }

  /* Toast */
  .toast-container {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
  }

  .toast {
    min-width: auto !important;
    width: 100% !important;
  }

  /* Footer */
  .footer {
    padding: 16px !important;
  }

  .footer p {
    font-size: 12px !important;
  }
}

@media (max-width: 480px) {
  .page-title, .page-header h1, .view-header h2 {
    font-size: 18px !important;
  }

  .stat-value {
    font-size: 20px !important;
  }

  .nav-link, .nav-item, .nav-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .logo-text, .logo-text h1 {
    font-size: 14px !important;
  }

  .contact-avatar {
    width: 32px !important;
    height: 32px !important;
  }
}
