/* ==========================================================================
   Rakantham CRM - Global Design System
   Resolves Floto Audit Issues (Typography, Buttons, Colors, Scales)
   ========================================================================== */

:root {
    /* TYPOGRAPHY SCALE (Issue 3: No consistent type scale) */
    --text-xs: 12px;   /* Minimum size for readability (Issue 12 & 13) */
    --text-sm: 14px;
    --text-base: 16px; /* Default body */
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;

    /* FONTS (Issue 1: Too many typefaces) */
    --font-sans: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Rajdhani', 'Inter', sans-serif;

    /* COLOR SYSTEM (Issue 4: Too many text colours) */
    --color-primary: #f97316; /* Brand Orange */
    --color-primary-hover: #ea580c;
    --color-secondary: #0c0f14; /* Brand Dark */
    --color-surface: #f1f5f9; 
    --color-card: #ffffff;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-text-dark: #333333;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --color-danger: #e94560;

    /* CORNER RADII (Issue 5: Inconsistent corner radii) */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
}

/* Base resets for standardized type scale */
html {
    font-size: var(--text-base);
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
}

/* Ensure no text is smaller than 12px for readability */
small, .text-sm-enforce {
    font-size: var(--text-xs) !important;
}

/* Heading Standardization */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

/* Remove ALL CAPS for long text (Issues 6-11) */
.sentence-case {
    text-transform: none !important;
}

/* ==========================================================================
   BUTTON SYSTEM (Issue 2: Many button styles)
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    text-transform: none; /* Prefer sentence case for readability */
}

/* Primary Button */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--color-surface);
    color: var(--color-text-main);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-border);
    color: var(--color-text-dark);
}

/* Ghost Button */
.btn-ghost {
    background-color: transparent;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-text-dark);
}
