/**
 * Main CSS cho Multi-Tenant Project
 * Font mặc định: Inter, system fonts fallback
 */

/* Import Google Fonts - Inter (modern, clean font) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    /* Font Family */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    
    /* Font Sizes */
    --font-size-xs: 0.75rem;   /* 12px */
    --font-size-sm: 0.875rem;  /* 14px */
    --font-size-base: 1rem;    /* 16px */
    --font-size-lg: 1.125rem;  /* 18px */
    --font-size-xl: 1.25rem;   /* 20px */
    --font-size-2xl: 1.5rem;   /* 24px */
    --font-size-3xl: 1.875rem; /* 30px */
    --font-size-4xl: 2.25rem;  /* 36px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    /* Colors */
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #64748b;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-error: #dc2626;
    
    --color-text-primary: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-bg-tertiary: #f3f4f6;
    
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
}

/* Base Typography */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll during animations */
    
    /* Flex layout for sticky footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content should grow to push footer down */
.main-content {
    flex: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInContent 0.6s ease-out 0.6s forwards;
}

/* Page content animation */
.page-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInContent 0.8s ease-out 0.4s forwards;
}

/* Keyframes for page content */
@keyframes fadeInContent {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: 0.5em;
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

/* Paragraphs */
p {
    margin-bottom: 1em;
    color: var(--color-text-primary);
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

/* Lists */
ul, ol {
    font-family: var(--font-primary);
    margin-bottom: 1em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.25em;
}

/* Buttons */
button, .btn {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Input Elements */
input, textarea, select {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

/* Code Elements */
code, pre {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: var(--font-size-sm);
}

/* Small Text */
small {
    font-family: var(--font-primary);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

/* Strong/Bold Text */
strong, b {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
}

/* Emphasis/Italic Text */
em, i {
    font-family: var(--font-primary);
    font-style: italic;
}

/* Utility Classes */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-light { color: var(--color-text-light); }

/* Responsive Font Sizes */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2rem;     /* 32px */
        --font-size-3xl: 1.75rem;  /* 28px */
        --font-size-2xl: 1.375rem; /* 22px */
    }
}

/* Print Styles */
@media print {
    body {
        font-family: var(--font-primary);
        color: black;
        background: white;
    }
}
