* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text: #0a0a0a;
    --bg: oklch(1 0 0);
    --background: oklch(1 0 0);
    --foreground: oklch(0.145 0 0);
    --card: oklch(1 0 0);
    --card-bg: #ffffff;
    --card-foreground: oklch(0.145 0 0);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.145 0 0);
    --primary: oklch(0.205 0 0);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.97 0 0);
    --secondary-foreground: oklch(0.205 0 0);
    --muted: oklch(0.97 0 0);
    --text-muted: oklch(0.556 0 0);
    --muted-foreground: oklch(0.556 0 0);
    --accent: oklch(0.97 0 0);
    --accent-foreground: oklch(0.205 0 0);
    --destructive: oklch(0.67 0.24 25);
    --destructive-foreground:  oklch(0.98 0 0);
    /*--destructive: oklch(0.577 0.245 27.325);*/
    /*--destructive-foreground: oklch(0.577 0.245 27.325);*/
    --border: oklch(0.922 0 0);
    --input: oklch(0.922 0 0);
    --ring: oklch(0.708 0 0);
    --chart-1: oklch(0.646 0.222 41.116);
    --chart-2: oklch(0.6 0.118 184.704);
    --chart-3: oklch(0.398 0.07 227.392);
    --chart-4: oklch(0.828 0.189 84.429);
    --chart-5: oklch(0.769 0.188 70.08);
    --radius: 0.625rem;
    --sidebar: oklch(0.985 0 0);
    --sidebar-foreground: oklch(0.145 0 0);
    --sidebar-primary: oklch(0.205 0 0);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.97 0 0);
    --sidebar-accent-foreground: oklch(0.205 0 0);
    --sidebar-border: oklch(0.922 0 0);
    --sidebar-ring: oklch(0.708 0 0);
    --danger: #ef4444;
    /*--warning: #f59e0b;*/
    --warning: oklch(0.85 0.09 90);
    --warning-foreground: oklch(0.42 0.12 90);
    --success: #10b981;
    --high: #f97316;
    --medium: #eab308;
    --low: #22c55e;
    --brand: #14b8a6;
    --light-hover: rgba(238, 238, 238, 0.8);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}


.p-6 {
    padding: 1.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-7xl {
    max-width: 80rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-2 {
    gap: 0.5rem;
}


.h-8 {
    height: 2rem;
}

.w-8 {
    width: 2rem;
}

.h-5 {
    height: 1.25rem;
}

.w-5 {
    width: 1.25rem;
}

.h-4 {
    height: 1rem;
}

.w-4 {
    width: 1rem;
}

.text-primary {
    color: var(--primary);
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.text-foreground {
    color: var(--foreground);
}

.text-muted-foreground {
    color: var(--muted-foreground);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-success {
    color: var(--success);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-button {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s;
}

.back-button:hover {
    background: var(--card-bg);
}

.shield-icon {
    width: 32px;
    height: 32px;
    color: var(--brand);
}

.icon {
    width: 20px;
    height: 20px;
}

h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* URL Selector */
.url-selector {
    width: 768px;
    max-width: 100%;
}

.url-selector label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.dropdown-wrapper {
    position: relative;
}

.dropdown-button {
    width: 100%;
    height: 48px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: "Courier New", monospace;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s;
}

.dropdown-button:hover {
    border-color: var(--primary);
}

.chevron-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    display: none;
    z-index: 100;
    max-height: 400px;
    overflow: hidden;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-search {
    width: 100%;
    height: 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0 12px;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 8px;
}

.dropdown-search:focus {
    outline: none;
    border-color: var(--primary);
}

.dropdown-items {
    max-height: 300px;
    overflow-y: auto;
}

.display-block {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    font-family: "Courier New", monospace;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--light-hover);
}

.dropdown-item.selected {
    background: var(--bg);
}

.check-icon {
    width: 20px;
    height: 20px;
    opacity: 0;
}

.dropdown-item.selected .check-icon {
    opacity: 1;
}

/* Tabs */
.tabs {
    margin-top: 24px;
}

.tabs-list {
    display: flex;
    gap: 4px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 6px;
    margin-bottom: 24px;
    width: fit-content;
}

.tab-trigger {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.tab-trigger:hover {
    color: var(--text);
}

.tab-trigger.active {
    background: var(--bg);
    color: var(--text);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 24px;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.card-header.collapsible {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.card-header.collapsible:hover {
    background: rgba(139, 92, 246, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-description {
    font-size: 12px;
    color: var(--text-muted);
}

.url-display {
    font-family: "Courier New", monospace;
}

.card-content {
    padding: 24px;
}

.card-content.collapsed {
    display: none;
}

/* Security Alerts */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    /*background: rgba(17, 17, 17, 0.5);*/
    transition: background 0.2s;
}

.alert-item:hover {
    background: var(--light-hover);
}

.alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-icon svg {
    width: 12px;
    height: 12px;
}

.alert-icon.critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.alert-icon.high {
    background: rgba(249, 115, 22, 0.1);
    color: var(--high);
}

.alert-icon.medium {
    background: rgba(234, 179, 8, 0.1);
    color: var(--medium);
}

.alert-content {
    flex: 1;
}

.alert-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.alert-item h4 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-muted);
}

.alert-time svg {
    width: 10px;
    height: 10px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.badge.critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge.low {
    background: rgba(249, 115, 22, 0.1);
    color: var(--high);
    border-color: rgba(249, 115, 22, 0.2);
}

.badge.high {
    background: rgba(234, 179, 8, 0.1);
    color: var(--medium);
    border-color: rgba(234, 179, 8, 0.2);
}

.badge.medium {
    background: rgba(34, 197, 94, 0.1);
    color: var(--low);
    border-color: rgba(34, 197, 94, 0.2);
}

.badge.low-security {
    background: rgba(249, 115, 22, 0.1);
    color: var(--high);
    border-color: rgba(249, 115, 22, 0.2);
}

.badge.medium-security {
    background: rgba(234, 179, 8, 0.1);
    color: var(--medium);
    border-color: rgba(234, 179, 8, 0.2);
}

.badge.high-security {
    background: rgba(34, 197, 94, 0.1);
    color: var(--low);
    border-color: rgba(34, 197, 94, 0.2);
}

.badge.outline {
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.badge.outline:hover {
    background: var(--bg);
}

/* Threat Dials */
.dials-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.dial-wrapper.side-dial {
    transform: scale(0.80);
}

.threat-dial-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
}

.threat-dial {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dial-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 12;
}


.btn-outline {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.dial-progress {
    fill: none;
    stroke: var(--danger);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 1s ease, stroke 1s ease;
}

.dial-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.dial-score {
    font-size: 36px;
    font-weight: 700;
}

.dial-max {
    font-size: 12px;
    color: var(--text-muted);
}

.risk-level {
    text-align: center;
}

.risk-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.risk-value {
    font-size: 18px;
    font-weight: 600;
}

.risk-value.medium {
    color: var(--medium);
}

.risk-value.low {
    color: var(--low);
}

.risk-value.high {
    color: var(--high);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.category-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
}

.category-score svg {
    width: 20px;
    height: 20px;
}

.category-score.high {
    color: var(--success);
}

.category-score.medium {
    color: var(--warning);
}

.category-score.low {
    color: var(--danger);
}

/*.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.5s ease;
}*/


/* Progress Bars */
.progress-container {
    position: relative;
    height: 0.75rem;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
    transition: width 0.7s ease-out;
}

.progress-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            45deg,
            transparent 25%,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 50%,
            transparent 75%,
            rgba(255, 255, 255, 0.1) 75%,
            rgba(255, 255, 255, 0.1)
    );
    background-size: 20px 20px;
    animation: slide 1s linear infinite;
}

.progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent, rgba(0, 0, 0, 0.1));
}

.progress-bar.low {
    background: linear-gradient(to right, rgb(239, 68, 68), rgb(220, 38, 38), rgb(185, 28, 28));
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.progress-bar.medium {
    background: linear-gradient(to right, rgb(234, 179, 8), rgb(249, 115, 22), rgb(234, 88, 12));
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
}

.progress-bar.high {
    background: linear-gradient(to right, rgb(34, 197, 94), rgb(16, 185, 129), rgb(5, 150, 105));
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.dial-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}


.category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.issue-count {
    font-size: 12px;
    color: var(--text-muted);
}

.issue-list {
    list-style: none;
    font-size: 14px;
    color: var(--text-muted);
}

.issue-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.issue-list li::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

/* Dependency Graph */
.dependency-graph {
    width: 100%;
    height: 400px;
    background: rgba(17, 17, 17, 0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.connection-line {
    stroke: #666;
    stroke-width: 2;
}

.node {
    cursor: pointer;
}

.node-glow {
    fill: rgba(139, 92, 246, 0.2);
}

.node-circle {
    stroke-width: 2;
}

.node-circle.safe {
    fill: rgba(34, 197, 94, 0.3);
    stroke: var(--success);
}

.node-circle.warning {
    fill: rgba(234, 179, 8, 0.3);
    stroke: var(--warning);
}

.node-text {
    fill: white;
    font-size: 12px;
    font-weight: 700;
    text-anchor: middle;
}

.node-text.warning {
    fill: #0a0a0a;
}

/* Dependency Details */
.dependency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dependency-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.package-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.dependency-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dependency-stats-1 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dependency-stats-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dependency-stats-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dependency-stats-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dependency-stats-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dependency-stats-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.stat-value svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.stat-value-text {
    font-size: 14px;
    font-weight: 500;
}

.separator {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.security-section h4,
.connections-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.security-section p {
    font-size: 14px;
    color: var(--text-muted);
}

.connected-packages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.no-style-link {
    text-decoration: inherit;
    color: inherit;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
    }

    .url-selector {
        width: 100%;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}


@keyframes slide {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}


/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--secondary);
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.icon-button {
    background: transparent;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.icon-button:hover {
    background-color: var(--accent);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    min-width: 200px;
    z-index: 50;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--accent);
}

.dropdown-separator {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

/* Popover */
.popover {
    display: none;
    position: fixed;
    z-index: 100;
}

.popover.active {
    display: block;
}

.popover-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    width: 275px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.popover-input {
    width: 100%;
    padding: 0.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.popover-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.popover-button {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.popover-button:hover {
    opacity: 0.9;
}

/* Graph Container */
.graph-container {
    position: relative;
    height: 400px;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
}

.graph-container svg {
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .dials-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .url-selector-container {
        width: 100%;
    }

    .mb-8 {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* clean layer-card aesthetic */
.card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;          /* light gray */
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 24px;
}

.card-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--background)
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding-top: 40px;
    padding-bottom: 40px;
}

.auth-card {
  width: 100%;
  max-width: 28rem;               /* max-w-md */
  background: #ffffff;
  border-radius: 0.75rem;         /* rounded-xl */
  border: 1px solid rgba(148,163,184,0.5); /* border-border/50 */
  padding: 1.75rem 2rem;
  box-shadow:
    0 10px 15px -3px rgba(15, 23, 42, 0.1),
    0 4px 6px -4px rgba(15, 23, 42, 0.1);  /* shadow-lg */
}

.auth-title {
  font-size: 1.5rem; /* text-2xl-ish */
  font-weight: 700;
  letter-spacing: -0.02em; /* tracking-tight */
}

.auth-subtitle {
  font-size: 0.95rem;
  color: #6b7280; /* muted foreground */
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;          /* space-y-1 */
  margin-bottom: 1.25rem;
}

.auth-icon-circle {
  background: rgba(17, 24, 39, 0.06); /* soft, neutral; tweak if you want blue */
  padding: 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.auth-icon {
  font-size: 1.75rem; /* mimic h-8 w-8 icon */
  line-height: 1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;                      /* space-y-4 */
  margin-top: 0.75rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;                    /* space-y-2 */
}

.auth-field label {
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-field input {
  height: 2.5rem;                 /* h-10 */
  padding: 0 0.75rem;             /* px-3 */
  border-radius: 0.5rem;          /* rounded-md */
  border: 1px solid #d1d5db;      /* border-input */
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 1px #11182733;
}

.auth-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-forgot-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.auth-primary-btn {
  width: 100%;                    /* w-full */
  height: 2.75rem;                /* roughly size="lg" */
  border-radius: 0.5rem;
  border: none;
  background: #111827;            /* dark, like v0 screenshot */
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.auth-primary-btn:hover {
  background: #020617;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  transform: translateY(-1px);
}

.auth-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}


.auth-submit {
    width: 100%;
    height: 45px;
    background: #3a6ff1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-submit:hover {
    background: #2c5cdf;
}

.auth-error {
    background: #ffe5e5;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ffb3b3;
    color: #a21f1f;
    font-size: 14px;
    margin-bottom: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.auth-footer a {
    color: #3a6ff1;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-logo {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 12px auto;
    opacity: 0.9;
}


/* resources preview page */
.resources-page {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.resources-container {
  max-width: 72rem;              /* ~max-w-7xl */
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.resources-header {
  display: flex;
  align-items: center;
    justify-content: space-between;  /* left + right */
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.resources-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 1rem;
}

.resources-back-btn:hover {
  background: hsl(var(--accent));
}

.resources-title {
  font-size: 1.875rem;           /* text-3xl */
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: left;
  margin: 0;
}

.resources-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Card */

.resources-card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow:
    0 10px 15px -3px rgba(15, 23, 42, 0.06),
    0 4px 6px -4px rgba(15, 23, 42, 0.05);
  padding: 1.5rem 1.75rem 1.75rem;
}

/* Card header */

.resources-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  /*margin-bottom: 0.75rem;*/
  border-bottom: 1px solid var(--border);
    color: hsl(var(--muted-foreground));
    font-weight: 600;
}

.resources-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.resources-card-description {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Search */

.resources-search-wrapper {
  position: relative;
  width: 20rem;
  max-width: 100%;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
}

.resources-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
}

.resources-search-input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem 0 2.3rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  font-size: 0.875rem;
}

.resources-search-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.resources-search-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* Table structure */

.resources-table-header {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 140px 140px 120px;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  /*border-top: 1px solid var(--border);*/
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.resources-table-header:first-child {
  border-top: 1px solid hsl(var(--border));
}


.resources-table-body {
  font-size: 0.9rem;
}

.resources-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 140px 140px 120px;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.resources-row:last-child {
  border-bottom: none;
}

.resources-row:hover {
  background: hsl(var(--muted) / 0.5);
}

.resources-row-empty {
  grid-template-columns: minmax(0, 1.5fr);
}

/* Column helpers */

.resources-col-center {
  text-align: center;
}

.resources-col-right {
  text-align: right;
}

/* Resource cell */

.resources-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resources-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--success));
  background: hsl(var(--success) / 0.1);
}

.resources-icon-safe {
  border-color: hsl(var(--success));
  background: hsl(var(--success) / 0.1);
}

.resources-icon-warning {
  border-color: hsl(var(--warning));
  background: hsl(var(--warning) / 0.1);
}

.resources-icon-critical {
  border-color: hsl(var(--danger));
  background: hsl(var(--danger) / 0.1);
}

.resources-main-text {
  display: flex;
  flex-direction: column;
}

.resources-name {
  font-weight: 600;
}

.resources-url {
  margin-top: 0.15rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Badges */

.resources-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.resources-badge-none {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.resources-badge-warn {
  background: var(--warning);
  color: var(--warning-foreground);
}

.resources-badge-danger {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

/* Score */

.resources-score {
  font-size: 1.5rem;
  font-weight: 700;
}

.resources-score-sub {
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
  margin-top: -2px;
}

/* Action link */

.resources-action-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.resources-action-link:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 768px) {

    .resources-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

    .resources-header-meta {
    width: 100%;
    flex-wrap: wrap;
  }

  .resources-container {
    padding: 1.75rem 1rem;
  }

  .resources-card {
    padding: 1.25rem 1rem 1.5rem;
  }

  .resources-table-header,
  .resources-row {
    grid-template-columns: minmax(0, 1.5fr) 120px 120px;
  }

  .resources-col-right {
    display: none;
  }

  .resources-search-wrapper {
    width: 100%;
  }
}


/* Right side of card header: meta info + search */
.resources-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.resources-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resources-header-meta {
  display: flex;
  gap: 0.75rem;
}

/* Small info boxes for user/org */
.resources-meta {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.resources-meta-box {
  min-width: 9rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--muted);
}

.resources-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}

.resources-meta-value {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Mobile: stack meta and search nicely */
@media (max-width: 768px) {
  .resources-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .resources-header-right {
    width: 100%;
    align-items: stretch;
  }

  .resources-meta {
    justify-content: space-between;
  }

  .resources-search-wrapper {
    width: 100%;
  }
}


.resources-org-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: var(--muted);
    color: var(--foreground);
    cursor: pointer;
}

.resources-org-select:hover {
    background: var(--accent);
}

.resources-org-select:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px var(--ring);
}


.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 100px;
  height: 100px;
  animation: spin 2s linear infinite;
  margin-left: auto;
  margin-right: auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}