/* Deepkamal Tools Hub - Enterprise Portal Stylesheet */
:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121c;
  --bg-card: rgba(15, 22, 36, 0.75);
  --bg-card-hover: rgba(22, 32, 52, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-glow: rgba(56, 189, 248, 0.25);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --brand-cyan: #06b6d4;
  --brand-blue: #3b82f6;
  --brand-indigo: #6366f1;
  --brand-emerald: #10b981;
  --brand-amber: #f59e0b;
  --brand-purple: #8b5cf6;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 35px rgba(6, 182, 212, 0.15);
  --shadow-glow-indigo: 0 0 40px rgba(99, 102, 241, 0.2);
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
}

.glow-orb-2 {
  position: absolute;
  top: 30%;
  right: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(16, 185, 129, 0.04) 50%, transparent 70%);
  filter: blur(90px);
  border-radius: 50%;
}

.glow-orb-3 {
  position: absolute;
  bottom: 0%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
}

/* Grid Overlay Texture */
.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

/* App Shell */
.app-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 20px;
  flex-wrap: wrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.brand-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo-badge .fallback-icon {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title span.tag {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.12);
  color: var(--brand-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Header Utilities */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 12px;
  font-weight: 500;
  color: #34d399;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: #10b981;
  opacity: 0.5;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.live-clock {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-company-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-company-info:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  padding: 48px 0 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  max-width: 820px;
  margin-bottom: 16px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 660px;
  margin-bottom: 32px;
}

/* Search Bar */
.search-wrapper {
  width: 100%;
  max-width: 520px;
  position: relative;
  margin-bottom: 36px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 48px 14px 44px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 14px;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.search-shortcut {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  pointer-events: none;
}

/* System Quick Stats Strip */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-item strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Main Dashboard Section */
.portal-content {
  margin-bottom: 60px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-count {
  font-size: 12px;
  color: var(--text-dim);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* Tool Card (Base) */
.tool-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

/* Active Hero Tool: Fast Bill Maker */
.tool-card.active-tool {
  border-color: rgba(56, 189, 248, 0.25);
  background: linear-gradient(165deg, rgba(17, 28, 48, 0.85) 0%, rgba(13, 18, 30, 0.9) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.tool-card.active-tool:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.tool-card.active-tool .card-glow-accent {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}

/* Inactive / Upcoming Cards */
.tool-card.upcoming-tool {
  opacity: 0.82;
  border-style: dashed;
}

.tool-card.upcoming-tool:hover {
  opacity: 0.95;
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Card Header */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}

.active-tool .card-icon-box {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.upcoming-tool .card-icon-box {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

.tool-card:hover .card-icon-box {
  transform: scale(1.05);
}

.card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.badge-live {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-upcoming {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-planned {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-version {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Card Body */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.tool-title {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-description {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.feature-tag {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 6px;
}

/* Card Actions */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-launch-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.btn-launch-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.btn-launch-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  cursor: not-allowed;
}

.quick-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-link-btn {
  font-size: 11.5px;
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-link-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Modal: Company Credentials */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-panel {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: 4px;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.cred-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-label {
  font-size: 12px;
  color: var(--text-muted);
}

.cred-val-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cred-value {
  font-size: 13px;
  font-family: monospace;
  color: #ffffff;
  font-weight: 500;
}

.copy-mini-btn {
  padding: 4px 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-mini-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  border: 1px solid var(--brand-cyan);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.portal-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .portal-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .hero-section {
    padding: 32px 0 24px;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .stats-strip {
    border-radius: var(--radius-md);
    gap: 14px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
