/**
 * InvTracker.in - Main Stylesheet
 * 
 * This stylesheet contains all reusable CSS components for the InvTracker.in platform.
 * Generic styles are designed to be used across multiple pages (mutual-funds, advisors, etc.)
 * 
 * Table of Contents:
 * 1. Reset and Base Styles
 * 2. Authentication Pages
 * 3. Forms (Base)
 * 4. Buttons (Base)
 * 5. Messages
 * 6. Dashboard Layout
 * 7. Cards
 * 8. Tables (Base)
 * 9. Container Layouts (mf-container pattern)
 * 10. Statistics Cards
 * 11. Enhanced Buttons
 * 12. Table Containers and Enhanced Tables
 * 13. Search Box
 * 14. Badges
 * 15. Action Buttons
 * 16. Card Grid Layouts (advisor cards, item cards)
 * 17. Modal Styles
 * 18. Form Enhancements
 * 19. Alert Messages
 * 20. Loading and No Data States
 * 21. File Upload Area
 * 22. Responsive Design
 */

/* ==========================================================================
   1. Reset and Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --success-color: #10b981;
  --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;
  --border-radius: 8px;
  --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
}

/* ==========================================================================
   2. Authentication Pages
   ========================================================================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
}

.auth-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 450px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--gray-600);
  font-size: 14px;
}

/* ==========================================================================
   3. Forms (Base)
   ========================================================================== */
.auth-form {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gray-500);
}

/* Password input wrapper */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--gray-700);
}

.password-toggle:focus {
  outline: none;
  color: var(--primary-color);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  margin-bottom: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  margin-bottom: 0;
  cursor: pointer;
  flex-shrink: 0;
  width: auto;
}

.checkbox-label span {
  user-select: none;
  flex-shrink: 0;
}

/* ==========================================================================
   4. Buttons (Base)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loader */
.loader {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   5. Messages
   ========================================================================== */
.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: var(--border-radius);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
}

.success-message {
  background-color: #d1fae5;
  color: #065f46;
  padding: 12px;
  border-radius: var(--border-radius);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid #a7f3d0;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.auth-footer p {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   6. Dashboard Layout
   ========================================================================== */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid var(--gray-200);
  padding: 20px;
}

.main-content {
  flex: 1;
  padding: 30px;
}

/* ==========================================================================
   7. Cards (Base)
   ========================================================================== */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 16px;
}

/* ==========================================================================
   8. Tables (Base)
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px;
  background-color: var(--gray-50);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid var(--gray-200);
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}

.table tr:hover {
  background-color: var(--gray-50);
}

/* ==========================================================================
   Container Layouts (for pages like Mutual Funds, Advisors, etc.)
   ========================================================================== */

.mf-container {
  max-width: 1400px;
  margin: 30px auto;
  padding: 20px;
}

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

.mf-header h1 {
  font-size: 2rem;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mf-actions {
  display: flex;
  gap: 15px;
}

/* Generic Page Layouts (Portfolio-style clean layout) */
.page-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

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

.page-header h1 {
  font-size: 2rem;
  color: #1a1a1a;
  margin: 0;
}

.page-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.page-summary-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-summary-card h3 {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.page-summary-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* Statistics Cards */
.mf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d3748;
}

.stat-card .label {
  font-size: 0.75rem;
  color: #718096;
  margin-bottom: 5px;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-danger {
  background: #f56565;
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* ==========================================================================
   Table Containers and Tables
   ========================================================================== */

.mf-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

.table-header {
  padding: 20px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.table-header h2 {
  font-size: 1.3rem;
  color: #2d3748;
  margin: 0;
}

.data-table {
  width: 100%;
  overflow-x: auto;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f8fafb;
}

.data-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: #4a5568;
  font-size: 0.9rem;
}

.data-table tbody tr:hover {
  background: #f9fafb;
  transition: background-color 0.2s ease;
}

/* Special table row types */
.advisor-group-header {
  border-left: 4px solid #667eea !important;
  font-weight: 600;
}

.advisor-group-header:hover {
  background: #edf2f7 !important;
}

.advisor-group-header td {
  border-bottom: 2px solid #e2e8f0 !important;
}

/* ==========================================================================
   Search Box
   ========================================================================== */

.search-box {
  position: relative;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
}

.search-box i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
}

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

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-purchase,
.badge.active {
  background: #c6f6d5;
  color: #22543d;
}

.badge-redemption,
.badge.inactive {
  background: #fed7d7;
  color: #742a2a;
}

.badge-dividend {
  background: #bee3f8;
  color: #2c5282;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.active {
  background: #c6f6d5;
  color: #22543d;
}

.status-badge.inactive {
  background: #fed7d7;
  color: #742a2a;
}

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

.action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.action-btn-edit {
  background: #bee3f8;
  color: #2c5282;
}

.action-btn-delete {
  background: #fed7d7;
  color: #742a2a;
}

.action-btn-toggle {
  background: #e2e8f0;
  color: #2d3748;
}

.action-btn:hover {
  opacity: 0.8;
}

/* ==========================================================================
   Card Grid Layouts (for advisor cards, etc.)
   ========================================================================== */

.advisors-grid,
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.advisor-card,
.item-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s;
}

.advisor-card:hover,
.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.advisor-card-header,
.item-card-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 20px;
}

.advisor-card-header h3,
.item-card-header h3 {
  margin: 0 0 5px 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.advisor-card-header .company,
.item-card-header .subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.advisor-card-body,
.item-card-body {
  padding: 20px;
}

.advisor-info,
.item-info {
  margin-bottom: 15px;
}

.advisor-info-item,
.item-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #4a5568;
}

.advisor-info-item i,
.item-info-item i {
  width: 20px;
  color: #718096;
}

.advisor-card-stats,
.item-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 15px;
  background: #f7fafc;
  border-radius: 8px;
  margin-bottom: 15px;
}

.advisor-card-stat,
.item-card-stat {
  text-align: center;
}

.advisor-actions,
.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.advisor-actions .btn,
.item-actions .btn {
  flex: 1;
  min-width: 80px;
  justify-content: center;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  padding: 25px 30px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #2d3748;
}

.close {
  font-size: 2rem;
  font-weight: bold;
  color: #718096;
  cursor: pointer;
  transition: color 0.3s;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.close:hover {
  color: #2d3748;
}

.modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

/* ==========================================================================
   Form Enhancements (extends base form styles)
   ========================================================================== */

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2d3748;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* ==========================================================================
   Alert Messages
   ========================================================================== */

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-success {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.alert-error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #fc8181;
}

/* ==========================================================================
   Loading and No Data States
   ========================================================================== */

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.loading i {
  font-size: 3rem;
  margin-bottom: 15px;
  animation: spin 1s linear infinite;
}

.no-data {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.no-data i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #cbd5e0;
}

.no-data p {
  margin: 10px 0;
  font-size: 1.1rem;
}

/* ==========================================================================
   File Upload Area
   ========================================================================== */

.file-upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: #f7fafc;
}

.file-upload-area.dragover {
  border-color: #667eea;
  background: #edf2f7;
}

.file-info {
  margin-top: 20px;
  padding: 15px;
  background: #f7fafc;
  border-radius: 8px;
}

/* ==========================================================================
   Page Container & Summary (Portfolio-style layouts)
   ========================================================================== */

.page-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

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

.page-header h1 {
  font-size: 2rem;
  color: #1a1a1a;
  margin: 0;
}

/* ==========================================================================
   Generic Action Buttons
   
   Usage:
   - Base class: .btn-action
   - Color variants: .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-outline
   - Size variants: .btn-sm, .btn-lg (optional)
   
   Examples:
   <button class="btn-action btn-primary">Add</button>
   <button class="btn-action btn-secondary btn-sm">Import</button>
   <button class="btn-action btn-danger">Delete</button>
   ========================================================================== */

.btn-action {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

/* Button Color Variants */
.btn-action.btn-primary {
  background: #0066cc;
  color: white;
}

.btn-action.btn-primary:hover {
  background: #0052a3;
}

.btn-action.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-action.btn-secondary:hover {
  background: #5a6268;
}

.btn-action.btn-success {
  background: #28a745;
  color: white;
}

.btn-action.btn-success:hover {
  background: #218838;
}

.btn-action.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-action.btn-danger:hover {
  background: #c82333;
}

.btn-action.btn-outline {
  background: transparent;
  border: 2px solid #0066cc;
  color: #0066cc;
}

.btn-action.btn-outline:hover {
  background: #0066cc;
  color: white;
}

/* Button Size Variants */
.btn-action.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-action.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.page-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.page-summary-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-summary-card h3 {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.page-summary-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* Asset Tabs */
.asset-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  border-bottom: 2px solid #e5e5e5;
}

.asset-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

.asset-tab:hover {
  color: #0066cc;
}

.asset-tab.active {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

/* Asset Table */
.asset-table {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.asset-table table {
  width: 100%;
  border-collapse: collapse;
}

.asset-table th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #1a1a1a;
}

.asset-table td {
  padding: 1rem;
  border-top: 1px solid #e5e5e5;
}

.asset-table tr:hover {
  background: #f8f9fa;
}

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

@media (max-width: 768px) {
  .auth-card {
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    width: 100%;
  }

  .mf-container {
    padding: 15px;
    margin: 15px auto;
  }

  .mf-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .mf-header h1 {
    font-size: 1.5rem;
  }

  .mf-actions {
    width: 100%;
    flex-direction: column;
  }

  .mf-actions .btn {
    width: 100%;
  }

  .mf-stats {
    grid-template-columns: 1fr;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    max-width: 100%;
  }

  .advisors-grid,
  .items-grid {
    grid-template-columns: 1fr;
  }

  .advisor-card-stats,
  .item-card-stats {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 5% 10px;
    max-width: calc(100% - 20px);
  }

  .modal-body {
    max-height: 60vh;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .page-summary {
    grid-template-columns: 1fr;
  }

  .asset-tabs {
    overflow-x: auto;
  }

  .asset-table th,
  .asset-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   23. Dashboard Header
   ========================================================================== */

/* CSS Reset & Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #667eea;
  --sidebar-width: 260px;
  --header-height: 70px;
  --footer-height: 60px;
  --bg-color: #f5f7fa;
  --text-dark: #2d3748;
  --text-light: #718096;
  --border-color: #e2e8f0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  color: var(--text-dark);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 999;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.header-nav-item {
  position: relative;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem;
  transition: color 0.2s;
}

.header-nav-item:hover {
  color: var(--primary-color);
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  display: none;
  z-index: 1000;
  margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: var(--bg-color);
  color: var(--primary-color);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-bar {
  position: relative;
}

.search-bar input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  width: 250px;
  transition: width 0.3s, border-color 0.3s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  width: 300px;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.user-profile:hover {
  background: var(--bg-color);
}

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

/* Main Wrapper */
.main-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  margin-bottom: var(--footer-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    left: 0;
    padding: 0 1rem;
  }

  .header-nav {
    display: none;
  }

  .search-bar input {
    width: 150px;
  }

  .search-bar input:focus {
    width: 200px;
  }

  .main-wrapper {
    margin-left: 0;
    padding: 1rem;
  }
}

/* ==========================================================================
   24. Dashboard Sidebar
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #1a202c;
  color: white;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  padding: 0.75rem 1.5rem;
  color: #a0aec0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar-item.active {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.sidebar-item i {
  width: 20px;
  text-align: center;
}

.badge {
  margin-left: auto;
  background: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

/* ==========================================================================
   25. Dashboard Footer
   ========================================================================== */

.footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--footer-height);
  background: white;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 998;
}

.footer-left {
  color: var(--text-light);
  font-size: 0.9rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-color);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer {
    left: 0;
    padding: 0 1rem;
  }

  .footer-left,
  .footer-right {
    font-size: 0.8rem;
  }

  .footer-right {
    gap: 1rem;
  }
}

/* ==========================================================================
   26. Page-Specific Styles
   ========================================================================== */

/* Legacy Button Support (deprecated - use .btn-action instead) */
.btn-add-asset {
  padding: 0.75rem 1.5rem;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-add-asset:hover {
  background: #0052a3;
}

.btn-import {
  padding: 0.75rem 1.5rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-import:hover {
  background: #5a6268;
}

/* Entity Type Badges */
.type-individual {
  background: #e6f4ea;
  color: #1e7e34;
}

.type-huf {
  background: #fff3e0;
  color: #f57c00;
}

.type-trust {
  background: #e3f2fd;
  color: #1565c0;
}

.type-partnership {
  background: #f3e5f5;
  color: #7b1fa2;
}

.type-company {
  background: #fce4ec;
  color: #c2185b;
}

.type-proprietorship {
  background: #e0f2f1;
  color: #00695c;
}

.entity-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* KYC Status Badges */
.kyc-verified {
  background: #e6f4ea;
  color: #1e7e34;
}

.kyc-pending {
  background: #fff3e0;
  color: #f57c00;
}

.kyc-rejected {
  background: #fdecea;
  color: #c62828;
}

/* Entity Status Badges */
.status-active {
  background: #e6f4ea;
  color: #1e7e34;
}

.status-inactive {
  background: #fdecea;
  color: #c62828;
}
