/* Dark scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Portal Specific Styles */

.login-screen,
.dashboard-screen {
  min-height: 100vh;
  padding: 120px 0 60px;
  background: 
    radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    #0a0a0a;
}

/* Login Screen */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
  max-width: 1000px;
  margin: 0 auto;
}

.login-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #60a5fa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.login-header p {
  color: #94a3b8;
  font-size: 1.125rem;
}

.login-form {
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 16px;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-spinner {
  animation: spin 1s linear infinite;
}

.login-help {
  text-align: center;
  color: #94a3b8;
}

.login-help p {
  margin-bottom: 8px;
}

.login-help a {
  color: #667eea;
  text-decoration: none;
}

.login-help a:hover {
  text-decoration: underline;
}

.login-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.info-card {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 32px;
}

.info-card h3 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #cbd5e1;
}

.feature-list li:last-child {
  margin-bottom: 0;
}

.feature-list svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Dashboard Screen */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 40px;
  padding: 32px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 16px;
}

.dashboard-title h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #60a5fa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.dashboard-title p {
  color: #94a3b8;
  font-size: 1.125rem;
  margin: 0;
}

.dashboard-actions {
  display: flex;
  gap: 16px;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  align-items: start;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e293b;
}

.section-header h2 {
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0;
}

.section-badge {
  background: #3b82f6;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Quotes and Projects Lists */
.quotes-list,
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quote-item,
.project-item {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quote-item:hover,
.project-item:hover {
  border-color: #475569;
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-2px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.item-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0;
}

.item-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-new {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.status-quoted {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-accepted {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-paid {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-in_progress {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-review {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.status-complete {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-declined {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.item-description {
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.5;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 0.875rem;
}

.item-amount {
  color: #10b981;
  font-weight: 600;
  font-size: 1rem;
}

/* Sidebar */
.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 24px;
}

.sidebar-card h3 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.125rem;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
}

.quick-action:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: #475569;
  color: #ffffff;
}

.action-icon {
  color: #667eea;
  flex-shrink: 0;
}

.account-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #1e293b;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  color: #94a3b8;
  font-size: 0.875rem;
}

.info-value {
  color: #ffffff;
  font-weight: 500;
  text-align: right;
}

.sidebar-card p {
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loading-spinner {
  margin-bottom: 24px;
  color: #667eea;
}

.loading-spinner svg {
  animation: spin 1s linear infinite;
}

.loading-screen p {
  color: #94a3b8;
  font-size: 1.125rem;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #1e293b;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #1e293b;
}

.modal-header h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(30, 41, 59, 0.5);
  color: #ffffff;
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  max-height: calc(80vh - 100px);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.empty-state svg {
  color: #475569;
  margin-bottom: 16px;
}

.empty-state h3 {
  color: #cbd5e1;
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 24px;
}

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

.quote-item,
.project-item {
  animation: fadeIn 0.5s ease-out;
}

/* Success/Error Messages */
.message {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.message.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .login-info {
    order: -1;
  }

  .dashboard-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .dashboard-sidebar {
    order: -1;
  }

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .login-screen,
  .dashboard-screen {
    padding: 100px 0 40px;
  }

  .login-card,
  .info-card,
  .section-card,
  .sidebar-card {
    padding: 24px;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    text-align: center;
  }

  .dashboard-actions {
    justify-content: center;
  }

  .item-header {
    flex-direction: column;
    gap: 8px;
    align-items: start;
  }

  .item-meta {
    flex-direction: column;
    gap: 8px;
    align-items: start;
  }

  .modal {
    padding: 10px;
  }

  .modal-body {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .login-card,
  .info-card,
  .section-card,
  .sidebar-card {
    padding: 20px;
  }

  .dashboard-header {
    padding: 20px;
  }

  .quote-item,
  .project-item {
    padding: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .dashboard-actions {
    flex-direction: column;
  }

  .dashboard-actions .btn {
    width: 100%;
  }
}
/* Quote Detail Styles */
.quote-status-banner {
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.quote-status-banner.status-quoted { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.quote-status-banner.status-new { background: rgba(250, 204, 21, 0.1); color: #fbbf24; border: 1px solid rgba(250, 204, 21, 0.2); }
.quote-status-banner.status-accepted, .quote-status-banner.status-paid { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }

.quote-summary-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(99,102,241,0.1));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}
.quote-summary-card .quote-amount {
  font-size: 2.2rem;
  font-weight: 700;
  color: #10b981;
  margin: 8px 0 4px;
}
.quote-summary-card .quote-amount-label {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quote-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.quote-info-item {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 10px;
  padding: 16px;
}
.quote-info-item .info-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.quote-info-item .info-value {
  color: #e2e8f0;
  font-size: 0.95rem;
}

.quote-description-box {
  background: rgba(30, 41, 59, 0.3);
  border-left: 3px solid #3b82f6;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.quote-description-box h4 {
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.quote-description-box p {
  color: #cbd5e1;
  line-height: 1.6;
}

.quote-services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.quote-service-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.quote-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
}
.quote-actions .btn { flex: 1; text-align: center; padding: 12px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; border: none; font-size: 0.95rem; transition: all 0.2s; }
.quote-actions .btn-approve { background: #10b981; color: #fff; }
.quote-actions .btn-approve:hover { background: #059669; }
.quote-actions .btn-question { background: transparent; color: #60a5fa; border: 1px solid #3b82f6; }
.quote-actions .btn-question:hover { background: rgba(59,130,246,0.1); }
.quote-actions .btn-decline { background: transparent; color: #64748b; border: 1px solid #334155; }
.quote-actions .btn-decline:hover { background: rgba(239,68,68,0.1); color: #f87171; border-color: #f87171; }

.quote-message-form {
  margin-top: 16px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 10px;
  display: none;
}
.quote-message-form textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.quote-message-form textarea:focus { outline: none; border-color: #3b82f6; }
.quote-message-form .form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.quote-message-form .form-actions button { padding: 8px 20px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; border: none; font-weight: 500; }
.quote-message-form .btn-send { background: #3b82f6; color: #fff; }
.quote-message-form .btn-cancel { background: transparent; color: #94a3b8; border: 1px solid #334155; }

.quote-messages-thread {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
}
.quote-messages-thread h4 {
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.thread-message {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  max-width: 85%;
  font-size: 0.9rem;
  line-height: 1.5;
}
.thread-message.client { background: rgba(59,130,246,0.15); color: #93c5fd; margin-left: auto; border-bottom-right-radius: 4px; }
.thread-message.team { background: rgba(30, 41, 59, 0.6); color: #cbd5e1; border-bottom-left-radius: 4px; }
.thread-message .msg-time { font-size: 0.7rem; color: #64748b; margin-top: 4px; }

@media (max-width: 480px) {
  .quote-info-grid { grid-template-columns: 1fr; }
  .quote-actions { flex-direction: column; }
}
