/* SWIFT Alliance Access - Compact Financial Desktop UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-topbar: #0A0F1D;
  --bg-sidebar: #0F172A;
  --bg-sidebar-hover: #1E293B;
  --bg-sidebar-active: #0052CC;
  --bg-main: #F1F5F9;
  --bg-card: #FFFFFF;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-link: #0052CC;
  --text-white: #FFFFFF;

  --border-card: #CBD5E1;
  --border-light: #E2E8F0;
  --border-sidebar: #1E293B;

  --status-green: #059669;
  --status-green-dot: #10B981;
  --status-blue: #0052CC;
  --status-blue-dot: #3B82F6;
  --status-orange: #D97706;
  --status-orange-dot: #F59E0B;
  --status-red: #DC2626;
  --status-red-dot: #EF4444;
  --status-gray-dot: #94A3B8;

  --radius: 3px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-link);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Compact Topbar */
.topbar {
  background-color: var(--bg-topbar);
  color: var(--text-white);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #1E293B;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Official SWIFT Brand Logo */
.swift-official-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-divider {
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.2);
}

.app-title {
  font-size: 12.5px;
  font-weight: 500;
  color: #E2E8F0;
  letter-spacing: 0.2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-icon-btn {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: var(--radius);
}

.topbar-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #EF4444;
  color: white;
  font-size: 8.5px;
  font-weight: 700;
  height: 12px;
  min-width: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  border: 1px solid var(--bg-topbar);
}

.topbar-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: var(--radius);
}

.topbar-dropdown:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #0052CC;
  color: white;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #94A3B8;
  font-size: 11px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 3px 6px;
  border-radius: var(--radius);
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

/* Layout Body */
.main-wrapper {
  display: flex;
  flex: 1;
}

/* Compact Sidebar */
.sidebar {
  width: 185px;
  background-color: var(--bg-sidebar);
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-sidebar);
  flex-shrink: 0;
}

.sidebar-menu {
  padding: 8px 6px;
}

.sidebar-section-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  padding: 10px 8px 3px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  margin-bottom: 1px;
}

.sidebar-item svg {
  width: 14px;
  height: 14px;
  color: #64748B;
}

.sidebar-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: #F8FAFC;
}

.sidebar-item:hover svg {
  color: #94A3B8;
}

.sidebar-item.active {
  background-color: var(--bg-sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
}

.sidebar-item.active svg {
  color: #FFFFFF;
}

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

.sidebar-footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  color: #64748B;
  font-size: 11px;
  text-decoration: none;
  border-radius: var(--radius);
}

.sidebar-footer-item:hover {
  color: #F8FAFC;
  background-color: var(--bg-sidebar-hover);
}

/* Main Workspace */
.content-area {
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

/* Compact Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dashboard-title-group h1 {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.01em;
}

.last-login {
  font-size: 11px;
  color: #64748B;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
  background-color: #F8FAFC;
  border-color: #94A3B8;
}

.btn-icon-only {
  padding: 4px 6px;
}

/* Compact 5 Overview Stat Cards Grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  min-height: 86px;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.stat-icon-wrapper {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #0052CC;
}

.stat-icon-green {
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #059669;
}

.stat-icon-purple {
  background-color: #F5F3FF;
  border: 1px solid #DDD6FE;
  color: #7C3AED;
}

.stat-icon-cyan {
  background-color: #ECFEFF;
  border: 1px solid #A5F3FC;
  color: #0891B2;
}

.stat-icon-check {
  background-color: #10B981;
  color: #FFFFFF;
}

.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-subtext {
  font-size: 10px;
  color: #64748B;
  font-weight: 600;
}

.stat-status-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #0F172A;
}

.stat-link {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-link);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}

.stat-link svg {
  width: 12px;
  height: 12px;
}

/* Grids */
.middle-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #FFFFFF;
}

.card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  padding: 4px 8px 4px 24px;
  font-size: 11px;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius);
  outline: none;
  width: 180px;
}

.search-box input:focus {
  border-color: #0052CC;
}

.search-icon {
  position: absolute;
  left: 7px;
  color: #94A3B8;
  pointer-events: none;
}

.icon-btn-gray {
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius);
  padding: 3px 5px;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn-gray:hover {
  background-color: #F8FAFC;
  color: #0F172A;
}

.card-body {
  padding: 0;
  flex: 1;
}

.card-footer {
  padding: 6px 12px;
  border-top: 1px solid var(--border-light);
  background-color: #FFFFFF;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* Compact Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}

.custom-table th {
  background-color: #F8FAFC;
  color: #475569;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.custom-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-light);
  color: #334155;
  white-space: nowrap;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background-color: #F8FAFC;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green { background-color: var(--status-green-dot); }
.status-dot.blue { background-color: var(--status-blue-dot); }
.status-dot.orange { background-color: var(--status-orange-dot); }
.status-dot.red { background-color: var(--status-red-dot); }
.status-dot.gray { background-color: var(--status-gray-dot); }

.direction-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}

.direction-indicator.incoming { color: var(--status-green); }
.direction-indicator.outgoing { color: var(--status-blue); }

/* Right Stack Cards */
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.connectivity-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connectivity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.connectivity-label {
  color: #334155;
  font-weight: 500;
}

.connectivity-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 11px;
}

.connectivity-value.online { color: var(--status-green); }
.connectivity-value.standby { color: #64748B; }
.connectivity-value.active { color: var(--status-green); }

.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius);
  color: #0052CC;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}

.shortcut-item:hover {
  background-color: #EFF6FF;
  border-color: #BFDBFE;
}

.shortcut-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Bottom Grid (3 Columns) */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.85fr;
  gap: 12px;
}

.alerts-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #F1F5F9;
}

.alert-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.alert-icon {
  color: #0052CC;
  margin-top: 1px;
  flex-shrink: 0;
}

.alert-content {
  display: flex;
  flex-direction: column;
}

.alert-text {
  color: #1E293B;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.alert-time {
  color: #94A3B8;
  font-size: 10px;
  margin-top: 1px;
}

/* Footer Status Bar */
.app-footer {
  background-color: #0A0F1D;
  color: #94A3B8;
  font-size: 10.5px;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-sidebar);
  margin-top: auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-status-badge {
  color: #10B981;
  font-weight: 600;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-right a {
  color: #94A3B8;
  font-weight: 400;
}

.footer-right a:hover {
  color: #FFFFFF;
}

@media (max-width: 1280px) {
  .overview-grid { grid-template-columns: repeat(3, 1fr); }
  .middle-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
}
