/* ==========================================================================
   MASTER DESIGN SYSTEM & COMPONENT STYLESHEET — Prabhavati / Navdisha
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties / Tokens
   ========================================================================== */
:root {
    /* Color Palette */
    --primary-color: #FF7A00;          /* Vibrant Brand Orange */
    --primary-dark: #E06900;           /* Primary Hover / Active */
    --secondary-color: #001F3F;        /* Deep Royal Navy */
    --secondary-dark: #00152B;         /* Dark Navy */
    --accent-color: #FFA94D;           /* Warm Golden Amber */

    /* Neutrals */
    --bg-light: #F8F9FA;               /* Light Background */
    --white: #FFFFFF;                  /* Pure White */
    --text-dark: #2D3748;              /* Main Text Charcoal */
    --text-muted: #6C757D;             /* Muted Gray Text */
    --border-color: #E2E8F0;           /* Soft Border */

    /* Contextual / Badges */
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --info-color: #17A2B8;

    /* Design Tokens */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --border-radius-pill: 50px;

    /* Shadows & Transitions */
    --box-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. Global Reset and Base Styles
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Accessibility Focus States */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Typography Hierarchy
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}

h1 { font-size: clamp(2.0rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.0rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-dark);
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* ==========================================================================
   4. Layout Containers & Grid Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.35);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg {
    padding: 0.9rem 2.25rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

/* ==========================================================================
   6. Forms & Inputs
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-dark);
}

.form-control, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    background-color: var(--white);
    color: var(--text-dark);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

/* ==========================================================================
   7. Cards
   ========================================================================== */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
}

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

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

/* ==========================================================================
   8. Tables
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.data-table, .table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: var(--white);
}

.data-table th, .table th {
    background: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td, .table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.92rem;
}

.data-table tbody tr:hover, .table tbody tr:hover {
    background-color: var(--bg-light);
}

/* ==========================================================================
   9. Badges & Alerts
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 0.35em 0.7em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    border-radius: var(--border-radius-pill);
    text-transform: capitalize;
}

.badge-success { background-color: rgba(40, 167, 69, 0.15); color: #1e7e34; }
.badge-warning { background-color: rgba(255, 193, 7, 0.2); color: #856404; }
.badge-danger  { background-color: rgba(220, 53, 69, 0.15); color: #bd2130; }
.badge-info    { background-color: rgba(23, 162, 184, 0.15); color: #117a8b; }
.badge-primary { background-color: rgba(255, 122, 0, 0.15); color: var(--primary-color); }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-danger  { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }
.alert-info    { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; }

/* ==========================================================================
   10. Global Animations
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.6s ease forwards; }
.animate-slide-up { animation: slideUp 0.5s ease forwards; }