/* Custom styles for Leader Panel */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar customizations */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.375rem;
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Avatar styles */
.avatar {
    font-weight: bold;
    border: 2px solid #fff;
    box-shadow: 0 0 0 0.125rem rgba(0, 0, 0, 0.1);
}

/* Feature icons */
.feature-icon {
    font-size: 1.5rem;
}

/* Button enhancements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Table enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    background-color: rgba(0, 0, 0, 0.03);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 0.375rem;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
}

/* Form enhancements */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Dashboard statistics cards */
.card.bg-primary .feature-icon,
.card.bg-success .feature-icon,
.card.bg-info .feature-icon,
.card.bg-warning .feature-icon,
.card.bg-danger .feature-icon {
    opacity: 0.8;
}

/* Jumbotron replacement */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border-radius: 0.5rem;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Loading states */
.btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn.loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #ffffff;
    }
    
    .card {
        background-color: #1e1e1e;
        color: #ffffff;
    }
    
    .card-header {
        background-color: rgba(255, 255, 255, 0.03);
        border-bottom: 1px solid rgba(255, 255, 255, 0.125);
    }
    
    .table th {
        background-color: rgba(255, 255, 255, 0.03);
        color: #ffffff;
    }
    
    .form-control, .form-select {
        background-color: #2a2a2a;
        border-color: #404040;
        color: #ffffff;
    }
    
    .form-control:focus, .form-select:focus {
        background-color: #2a2a2a;
        border-color: var(--primary-color);
        color: #ffffff;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .dropdown,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Team logo styles */
.team-logo-small {
    transition: transform 0.2s ease-in-out;
}

.team-logo-small:hover {
    transform: scale(1.1);
}

.team-logo-placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Logo upload styles */
.logo-upload-area {
    border: 2px dashed #ddd;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.15s ease-in-out;
    cursor: pointer;
}

.logo-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.logo-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
}

.logo-preview-container {
    position: relative;
    display: inline-block;
}

.logo-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.logo-preview-container:hover .logo-preview-overlay {
    opacity: 1;
}

/* File upload enhancement */
.form-control[type="file"] {
    border: 2px dashed #ddd;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
}

.form-control[type="file"]:focus {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

/* Progress bar enhancements */
.progress {
    border-radius: 0.375rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Upload status indicators */
.upload-success {
    color: var(--success-color);
}

.upload-error {
    color: var(--danger-color);
}

.upload-loading {
    color: var(--info-color);
}

/* Member image styles */
.member-image-preview {
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease-in-out;
}

.member-image-preview:hover {
    transform: scale(1.05);
}

/* Progress bar enhancements for achievements */
.achievement-progress {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.achievement-progress .progress-bar {
    transition: width 0.5s ease-in-out;
    border-radius: 10px;
    position: relative;
}

.achievement-progress .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.2) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Sales performance cards */
.sales-performance-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.sales-target-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.achievement-amount {
    color: var(--success-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Member card enhancements */
.member-card {
    transition: all 0.2s ease-in-out;
    border-radius: 0.5rem;
    overflow: hidden;
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.member-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Role badges with specific colors */
.role-badge-lead {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.role-badge-coordinator {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.role-badge-assistant {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
}

.role-badge-member {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

/* Progress indicators */
.progress-indicator {
    position: relative;
    background-color: #e9ecef;
    border-radius: 0.375rem;
    overflow: hidden;
}

.progress-indicator .progress-bar {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    animation: progress-shine 2s infinite linear;
}

@keyframes progress-shine {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Modal enhancements */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Responsive table enhancements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .member-avatar-large {
        width: 40px;
        height: 40px;
    }
    
    .achievement-progress {
        height: 6px;
    }
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(0, 123, 255, 0.2);
    border-left-color: var(--primary-color);
}

.sidebar-heading {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem 0.5rem;
    margin-bottom: 0;
}

/* Main content area with sidebar */
.main-content {
    margin-left: 250px;
    min-height: calc(100vh - 56px);
    padding: 2rem;
    transition: margin-left 0.3s ease-in-out;
}

/* Sidebar toggle button */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

@media (min-width: 992px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Navbar adjustments for sidebar layout */
@media (min-width: 992px) {
    .navbar {
        margin-left: 250px;
    }
}

/* Footer adjustments */
footer {
    margin-left: 250px;
    transition: margin-left 0.3s ease-in-out;
}

@media (max-width: 991.98px) {
    footer {
        margin-left: 0;
    }
}

/* Home Page Specific Styles */
html {
    scroll-behavior: smooth;
}

/* Modern Home Page Background */
body.modern-home {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Override sidebar margins for modern home page */
body.modern-home .main-content,
body.modern-home footer {
    margin-left: 0 !important;
    padding: 0 !important;
}

/* Modern gradient utility classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.bg-gradient-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.hero-section .container-fluid {
    position: relative;
    z-index: 2;
}

/* Modern footer styles */
.modern-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-left: 0 !important;
}

/* Glass morphism effect utility */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modern card hover effects */
.modern-card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.15);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Login Page Specific Styles */
body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

body.login-page .main-content,
body.login-page footer,
body.login-page main {
    margin-left: 0 !important;
    padding: 0 !important;
}

/* Home Page Responsive Styles */
/* Desktop only display for home page */
.desktop-only {
    display: block;
}

.mobile-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mobile-message-content {
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 400px;
}

.mobile-message .mobile-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.mobile-message h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.mobile-message p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.mobile-message .btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.mobile-message .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Hide home page content on tablet and mobile */
@media (max-width: 1199.98px) {
    .home-page .desktop-only {
        display: none !important;
    }
    
    .home-page .mobile-message {
        display: flex !important;
    }
    
    .home-page .modern-hero,
    .home-page .modern-footer {
        display: none !important;
    }
}

/* Show mobile message only on smaller screens */
@media (min-width: 1200px) {
    .mobile-message {
        display: none !important;
    }
}

/* Remove all margins and padding for home page */
.home-page .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.home-page .modern-main {
    padding: 0 !important;
    margin: 0 !important;
}

.home-page .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.home-page .col-lg-6 {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Remove header margins and padding */
.home-page .modern-hero {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 80px !important;
}

.home-page .modern-navbar {
    margin: 0 !important;
    padding: 0 !important;
}

.home-page .modern-navbar .container-fluid {
    margin: 0 !important;
    padding: 0.5rem 1rem !important;
}

.home-page .d-flex.justify-content-between.align-items-center {
    margin: 0 !important;
    padding: 0 !important;
}