/* ═══════════════════════════════════════════════
   InmoCRM — Premium Design System
   ═══════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Brand — Teal/Emerald real estate palette */
  --ic-accent:        #10b981;
  --ic-accent-hover:  #059669;
  --ic-accent-glow:   rgba(16, 185, 129, 0.25);
  --ic-gold:          #f59e0b;
  --ic-blue:          #3b82f6;
  --ic-info:          #06b6d4;

  /* Surfaces */
  --ic-bg:            #0c0f14;
  --ic-bg-card:       #141820;
  --ic-bg-elevated:   #1a1f2b;
  --ic-bg-input:      #10141c;
  --ic-border:        rgba(255,255,255,0.06);
  --ic-border-hover:  rgba(255,255,255,0.12);

  /* Text */
  --ic-text:          #e8eaed;
  --ic-text-muted:    #6b7280;
  --ic-text-dim:      #4b5563;

  /* Status */
  --ic-success:       #22c55e;
  --ic-warning:       #f59e0b;
  --ic-danger:        #ef4444;
  --ic-info-c:        #06b6d4;

  /* Spacing & Radius */
  --ic-radius:        12px;
  --ic-radius-sm:     8px;
  --ic-radius-lg:     16px;

  /* Sidebar */
  --ic-sidebar-w:     64px;
  --ic-sidebar-w-exp: 240px;
  --ic-topbar-h:      56px;

  /* Typography */
  --ic-font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ic-font-display:  'Outfit', var(--ic-font);

  /* Shadows */
  --ic-shadow:        0 4px 24px rgba(0,0,0,0.3);
  --ic-shadow-sm:     0 2px 8px rgba(0,0,0,0.2);
  --ic-glow:          0 0 20px rgba(16, 185, 129, 0.15);
}

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

body {
  font-family: var(--ic-font);
  background: var(--ic-bg);
  color: var(--ic-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Shell Layout ── */
.ic-shell { display: flex; min-height: 100vh; }

.ic-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--ic-sidebar-w);
  background: var(--ic-bg-card);
  border-right: 1px solid var(--ic-border);
  display: flex; flex-direction: column;
  z-index: 1050;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.ic-sidebar:hover { width: var(--ic-sidebar-w-exp); }

.ic-sidebar-brand {
  height: var(--ic-topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ic-border);
  white-space: nowrap;
}

.ic-sidebar-brand-icon {
  width: 32px; height: 32px;
  border-radius: var(--ic-radius-sm);
  background: linear-gradient(135deg, var(--ic-accent), var(--ic-blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  flex-shrink: 0;
}

.ic-sidebar-brand-text {
  font-family: var(--ic-font-display);
  font-weight: 700; font-size: 15px;
  color: var(--ic-text);
  opacity: 0;
  transition: opacity .2s;
}
.ic-sidebar:hover .ic-sidebar-brand-text { opacity: 1; }

.ic-sidebar-nav {
  flex: 1; padding: 8px; overflow-y: auto;
  scrollbar-width: thin;
}

.ic-sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--ic-radius-sm);
  color: var(--ic-text-muted);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  transition: all .15s;
}

.ic-sidebar-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--ic-text);
}

.ic-sidebar-nav a.active {
  background: var(--ic-accent-glow);
  color: var(--ic-accent);
}

.ic-sidebar-nav a i {
  font-size: 18px; width: 24px; text-align: center;
  flex-shrink: 0;
}

.ic-sidebar-nav .ic-nav-label {
  opacity: 0; transition: opacity .2s;
}
.ic-sidebar:hover .ic-nav-label { opacity: 1; }

.ic-sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--ic-border);
}

/* ── Topbar ── */
.ic-topbar {
  position: fixed;
  top: 0; left: var(--ic-sidebar-w); right: 0;
  height: var(--ic-topbar-h);
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ic-border);
  display: flex; align-items: center;
  padding: 0 24px;
  z-index: 1040;
  gap: 16px;
}

.ic-topbar-search {
  flex: 1; max-width: 400px;
}

.ic-topbar-search input {
  width: 100%;
  background: var(--ic-bg-input);
  border: 1px solid var(--ic-border);
  border-radius: 8px;
  padding: 7px 12px 7px 36px;
  color: var(--ic-text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.ic-topbar-search input:focus { border-color: var(--ic-accent); }

.ic-topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.ic-btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--ic-radius-sm);
  border: none; background: transparent;
  color: var(--ic-text-muted);
  font-size: 18px; cursor: pointer;
  transition: all .15s;
}
.ic-btn-icon:hover { background: rgba(255,255,255,0.06); color: var(--ic-text); }

.ic-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ic-accent), var(--ic-blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
}

/* ── Main Content ── */
.ic-main {
  margin-left: var(--ic-sidebar-w);
  margin-top: var(--ic-topbar-h);
  flex: 1;
  padding: 24px;
  min-height: calc(100vh - var(--ic-topbar-h));
}

/* ── Page Header ── */
.ic-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.ic-page-title {
  font-family: var(--ic-font-display);
  font-size: 24px; font-weight: 700;
  margin: 0; line-height: 1.2;
}
.ic-page-subtitle {
  font-size: 13px; color: var(--ic-text-muted);
  margin: 4px 0 0 0;
}

/* ── Cards ── */
.ic-card {
  background: var(--ic-bg-card);
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius);
  overflow: hidden;
  transition: border-color .2s;
}
.ic-card:hover { border-color: var(--ic-border-hover); }

.ic-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ic-border);
  font-size: 14px; font-weight: 600;
}
.ic-card-body { padding: 20px; }
.ic-card-link { font-size: 12px; color: var(--ic-accent); text-decoration: none; }
.ic-card-link:hover { text-decoration: underline; }

/* ── KPI Cards ── */
.ic-kpi-card {
  background: var(--ic-bg-card);
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color .2s, transform .2s;
}
.ic-kpi-card:hover { border-color: var(--ic-accent); transform: translateY(-2px); }

.ic-kpi-icon {
  width: 44px; height: 44px;
  border-radius: var(--ic-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: color-mix(in srgb, var(--kpi-color, var(--ic-accent)) 15%, transparent);
  color: var(--kpi-color, var(--ic-accent));
  flex-shrink: 0;
}

.ic-kpi-body { flex: 1; min-width: 0; }
.ic-kpi-value {
  font-family: var(--ic-font-display);
  font-size: 22px; font-weight: 700;
  line-height: 1.1;
}
.ic-kpi-label { font-size: 12px; color: var(--ic-text-muted); margin-top: 2px; }

/* ── Module Cards ── */
.ic-module-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  background: var(--ic-bg-card);
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius);
  padding: 20px 8px;
  text-decoration: none;
  color: var(--ic-text);
  transition: all .2s;
  position: relative;
}
.ic-module-card:hover {
  border-color: var(--ic-accent);
  transform: translateY(-3px);
  box-shadow: var(--ic-glow);
  color: var(--ic-text);
}
.ic-module-icon { font-size: 28px; color: var(--ic-accent); }
.ic-module-name { font-size: 12px; font-weight: 600; }
.ic-module-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--ic-danger);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
}

/* ── Tables ── */
.ic-table-wrap { overflow-x: auto; }
.ic-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.ic-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--ic-text-muted);
  border-bottom: 1px solid var(--ic-border);
}
.ic-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ic-border);
  vertical-align: middle;
}
.ic-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Forms ── */
.ic-form-control {
  width: 100%;
  background: var(--ic-bg-input);
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius-sm);
  padding: 10px 14px;
  color: var(--ic-text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ic-form-control:focus {
  border-color: var(--ic-accent);
  box-shadow: 0 0 0 3px var(--ic-accent-glow);
}
.ic-form-label {
  font-size: 12px; font-weight: 600;
  color: var(--ic-text-muted);
  margin-bottom: 6px; display: block;
}

/* ── Buttons ── */
.btn-accent {
  background: var(--ic-accent);
  color: #fff; border: none;
  padding: 8px 16px;
  border-radius: var(--ic-radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-accent:hover { background: var(--ic-accent-hover); color: #fff; }

/* ── Login Page ── */
.ic-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0c0f14 0%, #0a1628 50%, #0c0f14 100%);
}

.ic-login-canvas {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.ic-login-aurora {
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  z-index: 0; pointer-events: none;
}
.ic-login-aurora span {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .15;
  animation: ic-aurora 12s ease-in-out infinite alternate;
}
.ic-login-aurora span:nth-child(1) {
  width: 40vw; height: 40vw;
  background: var(--ic-accent);
  top: 30%; left: 20%;
}
.ic-login-aurora span:nth-child(2) {
  width: 35vw; height: 35vw;
  background: var(--ic-blue);
  top: 40%; left: 55%;
  animation-delay: -4s;
}
.ic-login-aurora span:nth-child(3) {
  width: 30vw; height: 30vw;
  background: #8b5cf6;
  top: 60%; left: 35%;
  animation-delay: -8s;
}

@keyframes ic-aurora {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(30px, -40px) rotate(15deg); }
}

.ic-login-card {
  position: relative; z-index: 10;
  background: rgba(20, 24, 32, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--ic-radius-lg);
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  box-shadow: var(--ic-shadow);
  transition: transform .15s;
}

.ic-login-logo { text-align: center; margin-bottom: 24px; }
.ic-login-logo-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: var(--ic-radius);
  background: linear-gradient(135deg, var(--ic-accent), var(--ic-blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
}
.ic-login-title {
  font-family: var(--ic-font-display);
  font-size: 20px; font-weight: 700;
}

.ic-login-typed {
  text-align: center;
  font-size: 13px;
  color: var(--ic-text-muted);
  margin-bottom: 20px;
  min-height: 20px;
}
.ic-typed-cursor {
  display: inline-block; width: 2px; height: 14px;
  background: var(--ic-accent);
  margin-left: 2px; vertical-align: text-bottom;
  animation: ic-blink .8s steps(2) infinite;
}
@keyframes ic-blink { 0% { opacity: 1; } 100% { opacity: 0; } }

.ic-login-form .form-group { margin-bottom: 14px; }

.ic-login-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--ic-accent), var(--ic-accent-hover));
  color: #fff; border: none;
  border-radius: var(--ic-radius-sm);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  margin-top: 4px;
}
.ic-login-submit:hover { filter: brightness(1.15); transform: translateY(-1px); }

.ic-login-clock {
  text-align: center;
  font-family: var(--ic-font-display);
  font-size: 28px; font-weight: 300;
  color: var(--ic-accent);
  letter-spacing: 4px;
  margin-top: 20px;
  text-shadow: 0 0 10px var(--ic-accent-glow);
}

.ic-login-badge {
  text-align: center;
  font-size: 11px;
  color: var(--ic-text-dim);
  margin-top: 16px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ── Property Card ── */
.ic-property-card {
  background: var(--ic-bg-card);
  border: 1px solid var(--ic-border);
  border-radius: var(--ic-radius);
  overflow: hidden;
  transition: all .2s;
}
.ic-property-card:hover {
  border-color: var(--ic-accent);
  transform: translateY(-3px);
  box-shadow: var(--ic-glow);
}
.ic-property-thumb {
  width: 100%; height: 180px;
  object-fit: cover;
  background: var(--ic-bg-elevated);
}
.ic-property-body { padding: 14px; }
.ic-property-price {
  font-family: var(--ic-font-display);
  font-size: 20px; font-weight: 700;
  color: var(--ic-accent);
}
.ic-property-address {
  font-size: 12px; color: var(--ic-text-muted);
  margin-top: 2px;
}
.ic-property-features {
  display: flex; gap: 12px;
  margin-top: 10px; font-size: 12px;
  color: var(--ic-text-muted);
}
.ic-property-features i { color: var(--ic-accent); margin-right: 3px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .ic-sidebar { display: none; }
  .ic-topbar { left: 0; }
  .ic-main { margin-left: 0; padding: 16px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
