/*
 * mtan v2 - Custom Theme
 * Color Palette based on AppColors Dart class
 * Primary: #4255A4, #10285D
 * Accent: #FF9F67, #E967FF
 */

:root {
    /* Primary Colors */
    --primary: #4255A4;
    --primary-dark: #10285D;
    --secondary: #6C757D;
    --accent: #FF9F67;
    --highlight: #E967FF;

    /* Neutral Colors */
    --white: #FFFFFF;
    --black: #000000;
    --grey-50: #FAFAFA;
    --grey-100: #F5F5F5;
    --grey-200: #EEEEEE;
    --grey-300: #E0E0E0;
    --grey-400: #BDBDBD;
    --grey-500: #9E9E9E;
    --grey-600: #757575;
    --grey-700: #616161;
    --grey-800: #424242;
    --grey-900: #212121;

    /* Light Theme */
    --light-bg: #F8F9FC;
    --light-surface: #FFFFFF;
    --light-card: #FFFFFF;
    --light-text: #10285D;
    --light-text-secondary: #6B7280;

    /* Dark Theme */
    --dark-bg: #0D1117;
    --dark-surface: #161B22;
    --dark-card: #21262D;
    --dark-text: #F0F6FC;
    --dark-text-secondary: #8B949E;
    --dark-input: #2D333B;

    /* Semantic Colors */
    --success: #22C55E;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4255A4 0%, #10285D 100%);
    --gradient-accent: linear-gradient(135deg, #FF9F67 0%, #E967FF 100%);
    --gradient-purple: linear-gradient(135deg, #E967FF 0%, #4255A4 100%);

    /* Bootstrap Overrides */
    --bs-primary: #4255A4;
    --bs-primary-rgb: 66, 85, 164;
    --bs-secondary: #6C757D;
    --bs-success: #22C55E;
    --bs-info: #3B82F6;
    --bs-warning: #F59E0B;
    --bs-danger: #EF4444;
    --bs-light: #F8F9FC;
    --bs-dark: #10285D;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background-color: var(--light-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-dark);
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 85, 164, 0.4);
    color: var(--white);
}

.btn-accent {
    background: var(--gradient-accent);
    border: none;
    color: var(--white);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 159, 103, 0.4);
    color: var(--white);
}

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

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

/* Section Styles */
.section-padding {
    padding: 5rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    display: inline-block;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-description {
    color: var(--light-text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.bg-dark {
    background-color: var(--dark-bg) !important;
}

/* Badge Styles */
.badge-primary {
    background: rgba(66, 85, 164, 0.15);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
}

.badge-admin {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.badge-api {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-micro {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Form Styles */
.form-control {
    border: 2px solid var(--grey-200);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 85, 164, 0.15);
}

/* Animation Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--grey-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .me-1, [dir="rtl"] .me-2, [dir="rtl"] .me-3 {
    margin-right: 0 !important;
}

[dir="rtl"] .ms-1, [dir="rtl"] .ms-2, [dir="rtl"] .ms-3 {
    margin-left: 0 !important;
}

[dir="rtl"] .me-1 { margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-left: 1rem !important; }
[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; }
[dir="rtl"] .ms-3 { margin-right: 1rem !important; }

[dir="rtl"] .text-md-end {
    text-align: left !important;
}

[dir="rtl"] .dropdown-menu-end {
    right: auto;
    left: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 2rem;
    }

    .section-padding {
        padding: 3rem 0;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.75rem;
    }

    .btn-lg {
        padding: 0.5rem 1.25rem;
        font-size: 1rem;
    }
}
