/**
 * DistroERP - Modern Distribution ERP Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --secondary-color: #475569;
    --success-color: #10b981;
    --success-soft: #ecfdf5;
    --warning-color: #f59e0b;
    --warning-soft: #fffbeb;
    --danger-color: #ef4444;
    --danger-soft: #fef2f2;
    --info-color: #06b6d4;
    --info-soft: #ecfeff;
    --dark-surface: #0f172a;
    --dark-card: #1e293b;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Typography & Code */
.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Card Styling */
.card-custom {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-header-clean {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 700;
}

/* KPI Summary Cards */
.kpi-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.kpi-card .kpi-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
}

.kpi-icon.primary { background: var(--primary-soft); color: var(--primary-color); }
.kpi-icon.success { background: var(--success-soft); color: var(--success-color); }
.kpi-icon.warning { background: var(--warning-soft); color: var(--warning-color); }
.kpi-icon.danger { background: var(--danger-soft); color: var(--danger-color); }
.kpi-icon.info { background: var(--info-soft); color: var(--info-color); }

.kpi-card .kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0.5rem;
}

.kpi-card .kpi-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navbar & Brand */
.navbar-custom {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.navbar-brand-badge {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Role Selector Badge */
.role-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* Tables */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table-custom td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* Badges */
.badge-pill {
    border-radius: var(--radius-full);
    padding: 0.35em 0.8em;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Modals */
.modal-content-custom {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Free Issue Tag */
.badge-free-issue {
    background-color: #8b5cf6;
    color: white;
    font-size: 0.725rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

/* Financial profit badge */
.badge-profit {
    background-color: #059669;
    color: white;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}
