/* ============================================
   Thracian Invest - Brand-Consistent Styles
   Matching thracianinvest.com identity
   ============================================ */

/* ============================================
   Squad Font Family
   ============================================ */

@font-face {
    font-family: 'Squad';
    src: url('../fonts/Squad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Squad';
    src: url('../fonts/Squad-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Squad';
    src: url('../fonts/Squad-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Squad';
    src: url('../fonts/Squad-Heavy.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   CSS Variables
   ============================================ */

:root {
    --primary-dark: #232c33;
    --primary-gradient-start: #232c33;
    --primary-gradient-end: #2d3740;
    --accent-gold: #f3c258;
    --success-green: #28a745;
    --danger-red: #dc3545;
    --warning-orange: #ffc107;
    --info-blue: #17a2b8;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --font-family: 'Squad', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   Global Font
   ============================================ */

body {
    font-family: var(--font-family);
}

/* ============================================
   Auth Pages — Unified Styles
   ============================================ */

body.auth-page {
    background: #1a2028;
    background-image: url('../images/auth-bg-light-trails.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

.auth-container {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-width: 440px;
    width: 100%;
    animation: slideUp 0.5s ease-out;
    position: relative;
}

.auth-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background-image: url('../images/bg-corner.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    opacity: 0.5;
    pointer-events: none;
}

.auth-header {
    background: linear-gradient(135deg, #232c33 0%, #2d3740 100%);
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f3c258 0%, #e6b44a 50%, #f3c258 100%);
}

.auth-header h2 {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 1.75rem;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

.auth-body {
    padding: 2.5rem 2rem;
}

.auth-body .form-group {
    margin-bottom: 1.5rem;
}

.auth-body .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #252525;
    font-size: 0.9rem;
}

.auth-body .form-control {
    border-radius: 10px;
    border: 2px solid #e5e5e5;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.auth-body .form-control:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 4px rgba(35, 44, 51, 0.08);
    background: white;
}

.btn-auth {
    background: linear-gradient(135deg, #232c33 0%, #2d3740 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(35, 44, 51, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 194, 88, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 44, 51, 0.3);
    background: linear-gradient(135deg, #2d3740 0%, #374350 100%);
    color: white;
}

.btn-auth:hover::before {
    left: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #999;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e5e5;
}

.auth-divider span {
    padding: 0 0.75rem;
}

.auth-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.auth-link:hover {
    color: var(--accent-gold);
    text-decoration: none;
    transform: translateX(2px);
}

.auth-footer {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.forgot-password {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    font-size: 0.85rem;
    color: #666;
}

.forgot-password a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Risk Profile Meter
   ============================================ */

.risk-meter {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.risk-meter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.risk-meter-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #232c33;
}

.risk-meter-bar {
    display: flex;
    align-items: stretch;
    height: 44px;
    border: 2px solid #bbb;
    border-radius: 4px;
    overflow: visible;
}

.risk-meter-edge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    color: #555;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.risk-meter-edge.left {
    padding-right: 0.8rem;
}

.risk-meter-edge.left::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 0;
    bottom: 0;
    width: 24px;
    background: white;
    clip-path: polygon(0 0, 0 100%, 100% 50%);
    z-index: 2;
}

.risk-meter-edge.right {
    padding-left: 0.8rem;
}

.risk-meter-edge.right::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 24px;
    background: white;
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
    z-index: 2;
}

.risk-meter-segments {
    display: flex;
    flex: 1;
    background: linear-gradient(to right,
        #5ab34a 0%,
        #8cc63f 14%,
        #b8d430 28%,
        #e8e520 42%,
        #f5c825 56%,
        #f09820 72%,
        #e74c3c 100%
    );
    position: relative;
}

.risk-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #2d3740;
    border-right: 1px solid rgba(255,255,255,0.25);
}

.risk-segment:last-child {
    border-right: none;
}

.risk-segment.active {
    font-size: 0;
}

.risk-segment.active::after {
    content: attr(data-num);
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 3;
    line-height: 1;
}

.risk-meter-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
}

.risk-info-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #232c33;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1.5px solid #dee2e6;
    transition: all 0.2s ease;
}

.risk-info-link:hover {
    background: #232c33;
    color: #f3c258;
    border-color: #232c33;
}

.risk-info-link i {
    font-size: 0.85rem;
}

/* ============================================
   Enhanced Buttons
   ============================================ */

.btn-thracian, .btn-primary {
    background: linear-gradient(135deg, #232c33 0%, #2d3740 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(35, 44, 51, 0.2);
}

.btn-thracian:hover, .btn-primary:hover {
    background: linear-gradient(135deg, #2d3740 0%, #374350 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 44, 51, 0.3);
    color: white;
}

.btn-outline-primary {
    border: 2px solid #232c33;
    color: #232c33;
}

.btn-outline-primary:hover {
    background: #232c33;
    border-color: #232c33;
    color: white;
}

/* ============================================
   Enhanced Cards
   ============================================ */

.card-hover, .portfolio-card {
    transition: all var(--transition-speed) ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: var(--border-radius);
}

.card-hover:hover, .portfolio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

/* ============================================
   Statistics Cards with Animations
   ============================================ */

.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--accent-gold) 100%);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0.5rem 0;
    animation: countUp 0.8s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Loading States & Animations
   ============================================ */

.spinner-border-thracian, .loading-spinner {
    color: var(--primary-dark);
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 6px;
    height: 20px;
    margin-bottom: 10px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Status Indicators with Pulse
   ============================================ */

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   Enhanced Forms
   ============================================ */

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(35, 44, 51, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #252525;
}

/* ============================================
   Enhanced Tables
   ============================================ */

.table thead th {
    background: var(--light-gray);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background: rgba(35, 44, 51, 0.03);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   Enhanced Badges
   ============================================ */

.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-thracian {
    background: linear-gradient(135deg, #232c33 0%, #2d3740 100%);
    color: white;
}

/* ============================================
   Alert Animations
   ============================================ */

.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Progress Bars
   ============================================ */

.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--accent-gold) 100%);
    border-radius: 10px;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-thracian {
    color: var(--primary-dark);
}

.bg-thracian {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.75rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .auth-body .btn,
    .card-body > .d-grid .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   Link Styles
   ============================================ */

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #2d3740;
    text-decoration: none;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
