/* TLT Production Design System - Sleek, Professional, Intuitive */
/* Replaces all inconsistent designs with production-ready components */

:root {
    /* TLT Brand Colors */
    --tlt-primary: #FF8C00;
    --tlt-secondary: #FFB84D;
    --tlt-dark: #1a2b47;
    --tlt-light: #f8f9fa;
    --tlt-white: #ffffff;
    --tlt-success: #28a745;
    --tlt-warning: #ffc107;
    --tlt-danger: #dc3545;
    --tlt-info: #17a2b8;
    
    /* Design System */
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-lg: 18px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Typography */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    
    /* Container Standards */
    --container-border: 3px solid var(--tlt-primary);
    --container-shadow: 0 8px 24px rgba(0,0,0,0.15);
    --header-border: 3px solid var(--tlt-primary);
    --header-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* RESET AND BASE STYLES */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--tlt-dark);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CONTAINER SYSTEM */
.tlt-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

.tlt-container-fluid {
    width: 100%;
    padding: 0 var(--space-lg);
}

/* CARD SYSTEM */
.tlt-card {
    background: var(--tlt-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tlt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tlt-primary), var(--tlt-secondary));
    opacity: 0;
    transition: var(--transition);
}

.tlt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--tlt-primary);
}

.tlt-card:hover::before {
    opacity: 1;
}

.tlt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid #e9ecef;
}

.tlt-card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--tlt-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tlt-card-icon {
    width: 24px;
    height: 24px;
    color: var(--tlt-primary);
}

.tlt-card-body {
    line-height: 1.6;
}

.tlt-card-compact {
    padding: var(--space-lg);
}

/* BUTTON SYSTEM */
.tlt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly */
    font-family: inherit;
}

.tlt-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.tlt-btn:hover::before {
    left: 100%;
}

/* Primary Button */
.tlt-btn-primary {
    background: linear-gradient(135deg, var(--tlt-primary), var(--tlt-secondary));
    color: white;
    box-shadow: var(--shadow-sm);
}

.tlt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--tlt-secondary), var(--tlt-primary));
}

/* Secondary Button */
.tlt-btn-secondary {
    background: var(--tlt-white);
    color: var(--tlt-primary);
    border-color: var(--tlt-primary);
}

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

/* Outline Button */
.tlt-btn-outline {
    background: transparent;
    color: var(--tlt-dark);
    border-color: #e9ecef;
}

.tlt-btn-outline:hover {
    background: var(--tlt-light);
    border-color: var(--tlt-primary);
    color: var(--tlt-primary);
}

/* Button Sizes */
.tlt-btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

.tlt-btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-lg);
    min-height: 52px;
}

/* Button States */
.tlt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.tlt-btn-loading {
    position: relative;
    color: transparent;
}

.tlt-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* FORM SYSTEM */
.tlt-form-group {
    margin-bottom: var(--space-lg);
}

.tlt-label {
    display: block;
    font-weight: 600;
    color: var(--tlt-dark);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

.tlt-input,
.tlt-textarea,
.tlt-select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
    transition: var(--transition);
    background: var(--tlt-white);
    font-family: inherit;
    min-height: 44px;
}

.tlt-input:focus,
.tlt-textarea:focus,
.tlt-select:focus {
    outline: none;
    border-color: var(--tlt-primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.tlt-textarea {
    min-height: 120px;
    resize: vertical;
}

/* STATS/METRICS SYSTEM */
.tlt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.tlt-stat-card {
    background: var(--tlt-white);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tlt-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tlt-primary), var(--tlt-secondary));
}

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

.tlt-stat-number {
    display: block;
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--tlt-primary);
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.tlt-stat-label {
    font-size: var(--font-size-sm);
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tlt-stat-change {
    font-size: var(--font-size-xs);
    margin-top: var(--space-xs);
}

.tlt-stat-change.positive {
    color: var(--tlt-success);
}

.tlt-stat-change.negative {
    color: var(--tlt-danger);
}

/* NAVIGATION SYSTEM */
.tlt-nav {
    background: var(--tlt-white);
    border-right: 2px solid var(--tlt-primary);
    box-shadow: var(--shadow-sm);
}

.tlt-nav-list {
    list-style: none;
    padding: var(--space-lg) 0;
    margin: 0;
}

.tlt-nav-item {
    margin-bottom: var(--space-xs);
}

.tlt-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    color: var(--tlt-dark);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    margin: 0 var(--space-md);
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.tlt-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: var(--tlt-primary);
    border-radius: 0 3px 3px 0;
    transition: var(--transition);
}

.tlt-nav-link:hover,
.tlt-nav-link.active {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 184, 77, 0.1));
    color: var(--tlt-primary);
    transform: translateX(4px);
}

.tlt-nav-link:hover::before,
.tlt-nav-link.active::before {
    width: 4px;
}

.tlt-nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.tlt-nav-link:hover .tlt-nav-icon,
.tlt-nav-link.active .tlt-nav-icon {
    opacity: 1;
}

/* PROGRESS SYSTEM */
.tlt-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.tlt-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tlt-primary), var(--tlt-secondary));
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.tlt-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ALERT SYSTEM */
.tlt-alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--border-radius-sm);
    border: 1px solid;
    margin-bottom: var(--space-lg);
    position: relative;
}

.tlt-alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--tlt-success);
    color: #155724;
}

.tlt-alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--tlt-warning);
    color: #856404;
}

.tlt-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--tlt-danger);
    color: #721c24;
}

.tlt-alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-color: var(--tlt-info);
    color: #0c5460;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .tlt-container {
        padding: 0 var(--space-md);
    }
    
    .tlt-card {
        padding: var(--space-lg);
    }
    
    .tlt-stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .tlt-btn {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-sm);
    }
    
    .tlt-nav-link {
        padding: var(--space-sm) var(--space-md);
        margin: 0 var(--space-sm);
    }
}

/* UTILITY CLASSES */
.tlt-text-center { text-align: center; }
.tlt-text-right { text-align: right; }
.tlt-text-primary { color: var(--tlt-primary); }
.tlt-text-secondary { color: var(--tlt-secondary); }
.tlt-text-muted { color: #6c757d; }
.tlt-bg-primary { background: var(--tlt-primary); }
.tlt-bg-light { background: var(--tlt-light); }
.tlt-mb-0 { margin-bottom: 0; }
.tlt-mb-sm { margin-bottom: var(--space-sm); }
.tlt-mb-md { margin-bottom: var(--space-md); }
.tlt-mb-lg { margin-bottom: var(--space-lg); }
.tlt-mt-lg { margin-top: var(--space-lg); }
.tlt-p-0 { padding: 0; }
.tlt-p-sm { padding: var(--space-sm); }
.tlt-p-md { padding: var(--space-md); }
.tlt-p-lg { padding: var(--space-lg); }

/* LOADING STATES */
.tlt-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tlt-fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

/* FOCUS ACCESSIBILITY */
.tlt-btn:focus,
.tlt-input:focus,
.tlt-nav-link:focus {
    outline: 2px solid var(--tlt-primary);
    outline-offset: 2px;
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .tlt-card {
        border-color: var(--tlt-dark);
    }
    
    .tlt-btn-primary {
        background: var(--tlt-dark);
        border-color: var(--tlt-dark);
    }
}

/* CONSISTENT CONTAINER STYLING */
.outer-container,
.main-wrapper,
.content-container,
.container,
.page-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background: var(--tlt-white);
    border: var(--container-border);
    border-radius: var(--border-radius);
    box-shadow: var(--container-shadow);
}

/* Smaller containers */
.card-container,
.widget-container,
.form-container {
    background: var(--tlt-white);
    border: var(--container-border);
    border-radius: var(--border-radius);
    box-shadow: var(--container-shadow);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* HEADER STYLING WITH ORANGE BORDERS */
header,
.site-header,
.page-header,
.section-header {
    border-bottom: var(--header-border);
    box-shadow: var(--header-shadow);
}

/* Page headers inside content */
.page-header,
.section-header,
.admin-page-header {
    background: var(--tlt-white);
    color: var(--tlt-primary);
    border: var(--container-border);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* RESPONSIVE CONTAINERS */
@media (max-width: 768px) {
    .outer-container,
    .main-wrapper,
    .content-container,
    .container,
    .page-container {
        margin: 10px;
        padding: 15px;
        border-width: 2px;
    }
    
    .page-header,
    .section-header {
        padding: var(--space-lg);
        border-width: 2px;
    }
}