/**
 * لینکدینی - استایل LinkedIn با تم سبز حسینی
 * نسخه ۲.۰ - بازطراحی کامل
 */

:root {
  --primary: #065f46;
  --primary-dark: #0f5132;
  --primary-light: #10b981;
  --accent: #d4af37;
  --accent-hover: #b8972e;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #111111;
  --text-secondary: #666666;
  --border: #e0e0e0;
  --hover-bg: #f5f5f5;
  --danger: #cc1016;
  --success: #10b981;
  --warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.li-container { max-width: 1128px; margin: 0 auto; padding: 0 16px; }

/* Header */
.li-header {
  background: var(--card-bg);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}

.li-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 16px;
}

.li-logo-search { display: flex; align-items: center; gap: 12px; }

.li-logo {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-decoration: none;
}

.li-logo.li-logo-image {
  width: 140px;
  height: auto;
  background: transparent;
  padding: 4px 0;
}

.li-logo.li-logo-image img {
  max-width: 100%;
  max-height: 40px;
  height: auto;
  object-fit: contain;
}

.li-search-box { position: relative; }
.li-search-box input {
  width: 280px;
  padding: 8px 40px 8px 12px;
  background: #eef3f8;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}
.li-search-box input:focus { outline: 2px solid var(--primary); }
.li-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

/* Navigation */
.li-nav { display: flex; align-items: center; gap: 4px; }

.li-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-width: 70px;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  border-bottom: 2px solid transparent;
}
.li-nav-item:hover { color: var(--text); }
.li-nav-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.li-nav-item span { font-size: 11px; margin-top: 2px; }
.li-nav-item svg { width: 24px; height: 24px; }

/* Avatar */
.li-avatar { width: 24px; height: 24px; border-radius: 50%; }
.li-avatar-lg { width: 48px; height: 48px; border-radius: 50%; }
.li-avatar-xl { width: 64px; height: 64px; border-radius: 50%; border: 3px solid white; }

/* Main Layout */
.li-main { padding: 24px 0; }

.li-grid {
  display: grid;
  grid-template-columns: 225px 1fr 300px;
  gap: 24px;
}

@media (max-width: 1024px) {
  .li-grid { grid-template-columns: 1fr; }
  .li-sidebar-left, .li-sidebar-right { display: none; }
}

/* Card */
.li-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}
.li-card + .li-card { margin-top: 8px; }

.li-sticky { position: sticky; top: 76px; }

/* Profile Sidebar */
.li-profile-cover {
  height: 56px;
  background: linear-gradient(to left, var(--primary-light), var(--primary));
}
.li-profile-avatar-wrapper { padding: 0 16px; margin-top: -32px; }
.li-profile-info { padding: 8px 16px 16px; }
.li-profile-info h2 { font-size: 16px; font-weight: 600; }
.li-profile-info p { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.li-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
}
.li-stat-row:hover { background: var(--hover-bg); }
.li-stat-row .label { color: var(--text-secondary); }
.li-stat-row .value { color: var(--primary); font-weight: 600; }

/* Buttons */
.li-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.li-btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}
.li-btn-primary:hover { background: var(--primary-dark); }

.li-btn-accent {
  background: var(--accent);
  color: white;
  border: none;
}
.li-btn-accent:hover { background: var(--accent-hover); }

.li-btn-outline {
  background: none;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.li-btn-outline:hover { background: rgba(6,95,70,0.1); }

.li-btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: none;
}
.li-btn-ghost:hover { background: var(--hover-bg); color: var(--text); }

/* Feed */
.li-feed { min-width: 0; }

/* News Sidebar */
.li-news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.li-news-header h3 { font-size: 16px; font-weight: 600; }

.li-news-list { list-style: none; padding: 0 16px 16px; }
.li-news-item { padding: 8px 0; }
.li-news-item a {
  text-decoration: none;
  display: block;
}
.li-news-item h4 { font-size: 14px; font-weight: 500; color: var(--text); }
.li-news-item a:hover h4 { color: var(--primary); text-decoration: underline; }
.li-news-item p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Suggestions */
.li-suggestion-item { display: flex; gap: 12px; padding: 12px 16px; }
.li-suggestion-info { flex: 1; }
.li-suggestion-info h4 { font-size: 14px; font-weight: 600; }
.li-suggestion-info p { font-size: 12px; color: var(--text-secondary); }

/* Footer */
.li-footer { text-align: center; padding: 16px; }
.li-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.li-footer-links a { font-size: 12px; color: var(--text-secondary); text-decoration: none; }
.li-footer-links a:hover { color: var(--primary); text-decoration: underline; }

.li-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
}
.li-footer-logo {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 8px;
}
.li-footer-brand span { font-size: 12px; color: var(--text-secondary); }

/* Form Elements */
.li-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}
.li-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(6,95,70,0.1); }

.li-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  background: white;
}

.li-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

/* Section Title */
.li-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 32px;
}

/* Dropdown */
.li-dropdown { position: relative; }
.li-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
  display: none;
  z-index: 100;
}
.li-dropdown-menu.show { display: block; animation: fadeIn 0.15s ease; }
.li-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  font-family: inherit;
  text-decoration: none;
}
.li-dropdown-item:hover { background: var(--hover-bg); }

/* Hero Section */
.li-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 48px 0;
  text-align: center;
}
.li-hero h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 16px; }
.li-hero p { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto 24px; }
.li-hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Features Grid */
.li-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 24px 0;
}

.li-feature-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.li-feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}

.li-feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.li-feature-card p { font-size: 14px; color: var(--text-secondary); }

/* Steps */
.li-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 24px 0;
}

.li-step { text-align: center; }

.li-step-number {
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin: 0 auto 16px;
}

.li-step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.li-step p { font-size: 14px; color: var(--text-secondary); }

/* Alert */
.li-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.li-alert-success { background: rgba(16,185,129,0.1); color: #065f46; border: 1px solid rgba(16,185,129,0.3); }
.li-alert-error { background: rgba(239,68,68,0.1); color: #991b1b; border: 1px solid rgba(239,68,68,0.3); }
.li-alert-warning { background: rgba(212,175,55,0.1); color: #92400e; border: 1px solid rgba(212,175,55,0.3); }

/* Mobile */
@media (max-width: 768px) {
  .li-nav { display: none; }
  .li-mobile-menu-btn { display: block !important; background: none; border: none; cursor: pointer; padding: 8px; }
  .li-search-box { display: none; }
  .li-hero h1 { font-size: 1.75rem; }
  .li-hero p { font-size: 1rem; }
}

.li-mobile-menu {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}

.li-mobile-menu-content {
  background: var(--card-bg);
  max-width: 280px;
  height: 100%;
  margin-right: auto;
  overflow-y: auto;
}

.li-mobile-menu-item {
  display: block;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.li-mobile-menu-item:hover { background: var(--hover-bg); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

.li-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }


/* Additional Styles for Public Pages */

/* Job Card */
.li-job-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}
.li-job-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.li-job-title { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.li-job-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.li-job-desc { font-size: 14px; color: var(--text); margin-bottom: 12px; line-height: 1.5; }

/* Profile Header */
.li-profile-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 24px;
  border-radius: 8px 8px 0 0;
}
.li-profile-header-content { display: flex; align-items: center; gap: 16px; }
.li-profile-avatar-large {
  width: 80px;
  height: 80px;
  background: white;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  flex-shrink: 0;
}
.li-profile-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.li-profile-header p { opacity: 0.9; font-size: 14px; }

/* Tabs */
.li-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.li-tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.li-tab:hover { color: var(--text); }
.li-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Score Display */
.li-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 12px;
}
.li-score-value { font-size: 56px; font-weight: 700; }
.li-score-label { font-size: 14px; opacity: 0.9; }

/* Tags */
.li-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--hover-bg);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}
.li-tag-primary { background: rgba(6,95,70,0.1); color: var(--primary); }
.li-tag-accent { background: rgba(212,175,55,0.2); color: var(--accent-hover); }

/* Empty State */
.li-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.li-empty svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; }
.li-empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }

/* Loading */
.li-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

/* Modal */
.li-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}
.li-modal-content {
  background: var(--card-bg);
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.li-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.li-modal-header h2 { font-size: 18px; font-weight: 600; }
.li-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}
.li-modal-body { padding: 16px; }

/* List Items */
.li-list-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.li-list-item:hover { background: var(--hover-bg); }
.li-list-item:last-child { border-bottom: none; }

/* Section Headers */
.li-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.li-section-header h2 { font-size: 18px; font-weight: 600; color: var(--primary); }

/* Chat Styles */
.li-chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 400px;
}
.li-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.li-chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.li-chat-message.user {
  background: var(--primary);
  color: white;
  align-self: flex-start;
  border-bottom-right-radius: 4px;
}
.li-chat-message.assistant {
  background: var(--hover-bg);
  color: var(--text);
  align-self: flex-end;
  border-bottom-left-radius: 4px;
}
.li-chat-input-container {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}
.li-chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
}
.li-chat-input:focus { outline: none; border-color: var(--primary); }
.li-chat-send {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.li-chat-send:hover { background: var(--primary-dark); }

/* Network Card */
.li-network-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.li-network-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  margin: 0 auto 12px;
}
.li-network-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.li-network-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

/* Form Page Styles */
.li-form-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.li-form-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.li-form-group {
  margin-bottom: 20px;
}
.li-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.li-form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Result Page Styles */
.li-result-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.li-result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.li-result-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.li-result-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}
.li-result-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}
.li-result-content ul {
  margin: 12px 0;
  padding-right: 20px;
}
.li-result-content li {
  margin-bottom: 8px;
}

/* Progress Bar */
.li-progress {
  height: 8px;
  background: var(--hover-bg);
  border-radius: 4px;
  overflow: hidden;
}
.li-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .li-profile-header-content { flex-direction: column; text-align: center; }
  .li-chat-message { max-width: 90%; }
  .li-result-header { flex-direction: column; text-align: center; }
}
