/* ========================================
   VERCEL-STYLE DESIGN SYSTEM
   Minimal, clean, professional
   ======================================== */

/* Hide deploy button */
.stDeployButton {display: none;}

/* ========================================
   TYPOGRAPHY - Vercel uses Inter, small sizes
   ======================================== */

/* Base font size - smaller like Vercel */
html, body, [data-testid="stAppViewContainer"] {
    font-size: 14px !important;
    line-height: 1.5 !important;
    letter-spacing: -0.01em !important;
}

/* Headings - clean, not too bold */
h1 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 1.5rem !important;
}

h2 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 1rem !important;
}

h3 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 0.75rem !important;
}

/* Paragraph text */
p, span, div {
    font-size: 0.875rem !important;
}

/* Small/caption text */
small, .stCaption, [data-testid="stCaptionContainer"] {
    font-size: 0.75rem !important;
    color: #666 !important;
}

/* ========================================
   LAYOUT - More whitespace, contained width
   ======================================== */

.block-container {
    padding: 2rem 2.5rem !important;
    max-width: 1400px !important;
}

/* Main content area */
[data-testid="stAppViewContainer"] > section > div {
    padding-top: 1rem !important;
}

/* Columns with proper gaps */
[data-testid="stHorizontalBlock"] {
    gap: 1rem !important;
}

/* Vertical spacing */
[data-testid="stVerticalBlock"] {
    gap: 1rem !important;
}

/* ========================================
   SIDEBAR - Vercel navigation style
   ======================================== */

[data-testid="stSidebar"] {
    background: #0a0a0a !important;
    border-right: 1px solid #1a1a1a !important;
}

/* Min-width only for sidebar content, not collapsed state */
[data-testid="stSidebarUserContent"] {
    min-width: 240px !important;
    padding: 1rem 0.75rem !important;
    padding-bottom: 5rem !important;
}

/* Reduce vertical gaps in sidebar */
[data-testid="stSidebar"] [data-testid="stVerticalBlock"] {
    gap: 2px !important;
}

/* Footer fixed at bottom */
[data-testid="stSidebar"] .st-key-sidebar-footer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0.75rem !important;
    background: #0a0a0a !important;
    border-top: 1px solid #1a1a1a !important;
}

/* User info in sidebar */
[data-testid="stSidebar"] [data-testid="stCaptionContainer"] {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem !important;
    color: #666 !important;
}

/* Hide divider in sidebar */
[data-testid="stSidebar"] hr {
    display: none !important;
}

/* Hide spacer container border */
[data-testid="stSidebar"] [data-testid="stVerticalBlockBorderWrapper"] {
    border: none !important;
}

/* ========================================
   NAV BUTTONS - Vercel menu style
   ======================================== */

[data-testid="stSidebar"] .stButton {
    margin: 0 !important;
}

[data-testid="stSidebar"] .stButton > button {
    width: 100% !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0 !important;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #888 !important;
    transition: all 0.15s ease !important;
}

[data-testid="stSidebar"] .stButton > button:hover {
    background: rgba(255,255,255,0.05) !important;
    color: #ededed !important;
}

/* Active nav item */
[data-testid="stSidebar"] .stButton > button[kind="primary"] {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    font-weight: 500 !important;
}

/* Icon styling */
[data-testid="stSidebar"] .stButton [data-testid="stIconMaterial"] {
    font-size: 16px !important;
    opacity: 0.6 !important;
}

[data-testid="stSidebar"] .stButton > button:hover [data-testid="stIconMaterial"],
[data-testid="stSidebar"] .stButton > button[kind="primary"] [data-testid="stIconMaterial"] {
    opacity: 1 !important;
}

/* Button content alignment */
[data-testid="stSidebar"] .stButton button > div {
    width: 100% !important;
}

[data-testid="stSidebar"] .stButton button span[data-has-shortcut] {
    justify-content: flex-start !important;
}

/* ========================================
   METRIC CARDS - Vercel dashboard style
   ======================================== */

[data-testid="stMetric"] {
    background: #0a0a0a !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 8px !important;
    padding: 1rem 1.25rem !important;
}

[data-testid="stMetricLabel"] {
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #666 !important;
    font-weight: 500 !important;
}

[data-testid="stMetricValue"] {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    color: #ededed !important;
}

[data-testid="stMetricDelta"] {
    font-size: 0.75rem !important;
}

/* ========================================
   BUTTONS - Vercel button style
   ======================================== */

.stButton > button {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    border: 1px solid #333 !important;
    background: transparent !important;
    color: #ededed !important;
    transition: all 0.15s ease !important;
}

.stButton > button:hover {
    background: #111 !important;
    border-color: #444 !important;
}

/* Primary button */
.stButton > button[kind="primary"] {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

.stButton > button[kind="primary"]:hover {
    background: #ededed !important;
    border-color: #ededed !important;
}

/* ========================================
   INPUTS - Clean, minimal
   ======================================== */

[data-testid="stTextInput"] input,
[data-testid="stNumberInput"] input,
[data-testid="stSelectbox"] > div > div {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    border: 1px solid #333 !important;
    background: #0a0a0a !important;
}

[data-testid="stTextInput"] input:focus,
[data-testid="stNumberInput"] input:focus {
    border-color: #0070f3 !important;
    box-shadow: 0 0 0 1px #0070f3 !important;
}

/* Labels */
[data-testid="stWidgetLabel"] {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #888 !important;
    margin-bottom: 0.25rem !important;
}

/* ========================================
   TABLES - Vercel data table style
   ======================================== */

[data-testid="stDataFrame"],
[data-testid="stTable"] {
    font-size: 0.8125rem !important;
}

[data-testid="stDataFrame"] th {
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #666 !important;
    font-weight: 500 !important;
    background: #0a0a0a !important;
    border-bottom: 1px solid #1a1a1a !important;
}

[data-testid="stDataFrame"] td {
    border-bottom: 1px solid #1a1a1a !important;
    padding: 0.75rem !important;
}

/* ========================================
   TABS - Vercel tab style
   ======================================== */

[data-testid="stTabs"] [data-baseweb="tab-list"] {
    gap: 0 !important;
    border-bottom: 1px solid #1a1a1a !important;
}

[data-testid="stTabs"] [data-baseweb="tab"] {
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    padding: 0.75rem 1rem !important;
    color: #666 !important;
    border-bottom: 2px solid transparent !important;
}

[data-testid="stTabs"] [data-baseweb="tab"]:hover {
    color: #ededed !important;
}

[data-testid="stTabs"] [data-baseweb="tab"][aria-selected="true"] {
    color: #fff !important;
    font-weight: 500 !important;
    border-bottom-color: #fff !important;
}

/* ========================================
   EXPANDER - Clean accordion
   ======================================== */

[data-testid="stExpander"] {
    border: 1px solid #1a1a1a !important;
    border-radius: 8px !important;
    background: #0a0a0a !important;
}

[data-testid="stExpander"] summary {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.75rem 1rem !important;
}

/* ========================================
   ALERTS/INFO BOXES
   ======================================== */

[data-testid="stAlert"] {
    font-size: 0.8125rem !important;
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    border: 1px solid !important;
}

/* Info */
.stAlert[data-baseweb="notification"][kind="info"] {
    background: rgba(0, 112, 243, 0.1) !important;
    border-color: rgba(0, 112, 243, 0.3) !important;
}

/* Success */
.stAlert[data-baseweb="notification"][kind="positive"] {
    background: rgba(0, 200, 83, 0.1) !important;
    border-color: rgba(0, 200, 83, 0.3) !important;
}

/* Warning */
.stAlert[data-baseweb="notification"][kind="warning"] {
    background: rgba(245, 166, 35, 0.1) !important;
    border-color: rgba(245, 166, 35, 0.3) !important;
}

/* Error */
.stAlert[data-baseweb="notification"][kind="negative"] {
    background: rgba(238, 0, 0, 0.1) !important;
    border-color: rgba(238, 0, 0, 0.3) !important;
}

/* ========================================
   DIVIDERS
   ======================================== */

hr {
    border: none !important;
    border-top: 1px solid #1a1a1a !important;
    margin: 1.5rem 0 !important;
}

/* ========================================
   SCROLLBAR - Minimal
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* ========================================
   CODE BLOCKS
   ======================================== */

code, pre {
    font-size: 0.8125rem !important;
    font-family: 'Geist Mono', 'SF Mono', Monaco, monospace !important;
    background: #0a0a0a !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 4px !important;
}

pre {
    padding: 1rem !important;
}

code {
    padding: 0.125rem 0.375rem !important;
}

/* ========================================
   BADGES/TAGS
   ======================================== */

[data-testid="stTag"] {
    font-size: 0.6875rem !important;
    font-weight: 500 !important;
    padding: 0.125rem 0.5rem !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

[data-testid="stProgress"] > div {
    height: 4px !important;
    border-radius: 2px !important;
    background: #1a1a1a !important;
}

[data-testid="stProgress"] > div > div {
    background: #0070f3 !important;
}

/* ========================================
   SPINNER
   ======================================== */

[data-testid="stSpinner"] {
    font-size: 0.8125rem !important;
    color: #666 !important;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

[data-testid="stToast"] {
    font-size: 0.8125rem !important;
    border-radius: 6px !important;
}
