/* ================================================================
   SHADCN-INSPIRED DESIGN SYSTEM FOR IDEATION HUB
   Version: 1.0
   
   Include this file in your pages:
   <link rel="stylesheet" href="css/shadcn-style.css">
   
   Then add class "shadcn-ui" to your body or main container
   ================================================================ */

/* ================================================================
   CSS VARIABLES (Design Tokens)
   ================================================================ */
:root {
    /* Background colors */
    --background: #ffffff;
    --background-muted: #f9fafb;
    --background-subtle: #f3f4f6;
    
    /* Foreground/text colors */
    --foreground: #09090b;
    --foreground-muted: #71717a;
    --foreground-subtle: #a1a1aa;
    
    /* Border colors */
    --border: #e4e4e7;
    --border-muted: #f4f4f5;
    
    /* Primary (brand purple as accent) */
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-muted: #ede9fe;
    --primary-foreground: #ffffff;
    
    /* Secondary */
    --secondary: #f4f4f5;
    --secondary-hover: #e4e4e7;
    --secondary-foreground: #18181b;
    
    /* Functional colors */
    --success: #22c55e;
    --success-muted: #dcfce7;
    --success-foreground: #166534;
    
    --warning: #f59e0b;
    --warning-muted: #fef3c7;
    --warning-foreground: #92400e;
    
    --danger: #ef4444;
    --danger-muted: #fee2e2;
    --danger-foreground: #991b1b;
    
    --info: #3b82f6;
    --info-muted: #dbeafe;
    --info-foreground: #1e40af;
    
    /* Radius - consistent throughout */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-full: 9999px;
    
    /* Shadows - very subtle */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ================================================================
   BASE STYLES
   ================================================================ */
.shadcn-ui {
    font-family: var(--font-sans);
    color: var(--foreground);
    background-color: var(--background-muted);
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
    background-color: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: -0.01em;
    margin: 0;
}

.card-description {
    font-size: 0.875rem;
    color: var(--foreground-muted);
    margin-top: 0.25rem;
}

.card-content {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.5;
}

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

/* Primary Button - Dark (default shadcn style) */
.btn-primary {
    background-color: var(--foreground);
    color: var(--background);
    border-color: var(--foreground);
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

/* Accent Button - Purple (brand color) */
.btn-accent {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-accent:hover:not(:disabled) {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Secondary Button - Light with border */
.btn-secondary {
    background-color: var(--background);
    color: var(--foreground);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--background-subtle);
}

/* Ghost Button - Transparent */
.btn-ghost {
    background-color: transparent;
    color: var(--foreground);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--background-subtle);
}

/* Destructive Button */
.btn-danger {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
}

/* Icon Button */
.btn-icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}

.btn-icon.btn-sm {
    width: 2rem;
    height: 2rem;
    padding: 0.375rem;
}

/* ================================================================
   FORM ELEMENTS
   ================================================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.375rem;
}

.form-label-muted {
    font-weight: 400;
    color: var(--foreground-muted);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--foreground);
    transition: all 0.15s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--foreground-subtle);
}

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

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.form-check:hover {
    background-color: var(--background-subtle);
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--foreground);
    cursor: pointer;
}

/* ================================================================
   BADGES
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    line-height: 1;
}

.badge-default {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

.badge-primary {
    background-color: var(--primary-muted);
    color: var(--primary);
}

.badge-success {
    background-color: var(--success-muted);
    color: var(--success-foreground);
}

.badge-warning {
    background-color: var(--warning-muted);
    color: var(--warning-foreground);
}

.badge-danger {
    background-color: var(--danger-muted);
    color: var(--danger-foreground);
}

.badge-info {
    background-color: var(--info-muted);
    color: var(--info-foreground);
}

/* Outline Badge */
.badge-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground-muted);
}

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid;
    font-size: 0.875rem;
    display: flex;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.alert-content {
    flex-grow: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-description {
    color: inherit;
    opacity: 0.9;
}

.alert-success {
    background-color: var(--success-muted);
    border-color: #bbf7d0;
    color: var(--success-foreground);
}

.alert-warning {
    background-color: var(--warning-muted);
    border-color: #fde68a;
    color: var(--warning-foreground);
}

.alert-danger {
    background-color: var(--danger-muted);
    border-color: #fecaca;
    color: var(--danger-foreground);
}

.alert-info {
    background-color: var(--info-muted);
    border-color: #bfdbfe;
    color: var(--info-foreground);
}

/* ================================================================
   MODALS / DIALOGS
   ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--foreground-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background-color: var(--background-subtle);
    color: var(--foreground);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-container {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background-color: var(--background-muted);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    color: var(--foreground-muted);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-muted);
    color: var(--foreground);
}

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

.table tr:hover td {
    background-color: var(--background-muted);
}

/* ================================================================
   TABS / NAVIGATION
   ================================================================ */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: -1px;
}

.tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.tab:hover {
    color: var(--foreground);
}

.tab.active {
    color: var(--foreground);
    border-bottom-color: var(--foreground);
}

/* Pill-style tabs */
.tabs-pills {
    display: flex;
    gap: 0.25rem;
    border: none;
}

.tab-pill {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.tab-pill:hover {
    background-color: var(--background-subtle);
    color: var(--foreground);
}

.tab-pill.active {
    background-color: var(--foreground);
    color: var(--background);
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    background-color: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.sidebar-content {
    padding: 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--foreground-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.sidebar-item:hover {
    background-color: var(--background-subtle);
    color: var(--foreground);
}

.sidebar-item.active {
    background-color: var(--primary-muted);
    color: var(--primary);
}

/* ================================================================
   STATUS INDICATORS
   ================================================================ */
.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.status-dot-success {
    background-color: var(--success);
}

.status-dot-warning {
    background-color: var(--warning);
}

.status-dot-danger {
    background-color: var(--danger);
}

.status-dot-muted {
    background-color: var(--foreground-subtle);
}

/* AI Validated Badge */
.ai-validated-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--success);
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.ai-validated-badge i {
    font-size: 0.625rem;
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.text-muted {
    color: var(--foreground-muted);
}

.text-subtle {
    color: var(--foreground-subtle);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-mono {
    font-family: var(--font-mono);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-t {
    border-top: 1px solid var(--border);
}

.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

/* Spacing */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
