/* Client Management System - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 600;
}

/* Dashboard Cards with Modern Design */
.dashboard-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-gradient);
    z-index: -1;
}

.dashboard-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    animation: float-pattern 25s linear infinite;
    z-index: 0;
}

@keyframes float-pattern {
    0% { transform: translateX(0) translateY(0) rotate(0deg); }
    25% { transform: translateX(-10px) translateY(-10px) rotate(90deg); }
    50% { transform: translateX(0) translateY(-20px) rotate(180deg); }
    75% { transform: translateX(10px) translateY(-10px) rotate(270deg); }
    100% { transform: translateX(0) translateY(0) rotate(360deg); }
}

.dashboard-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dashboard-card:hover::after {
    animation-duration: 15s;
    opacity: 0.6;
}

.dashboard-card .card-body {
    padding: 1.25rem;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.dashboard-card .card-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

.dashboard-card .card-text {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.dashboard-card .card-icon {
    font-size: 3rem;
    opacity: 0.2;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    z-index: 1;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.dashboard-card:hover .card-icon {
    opacity: 0.3;
    transform: rotate(10deg) scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.dashboard-card .card-footer {
    border-radius: 0 0 20px 20px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-card:hover .card-footer {
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(20px);
}

.dashboard-card .card-footer a {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-card:hover .card-footer a {
    transform: translateX(5px);
}

/* Gradient Color Schemes */
.dashboard-card.bg-primary {
    --card-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-card.bg-success {
    --card-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.dashboard-card.bg-info {
    --card-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.dashboard-card.bg-warning {
    --card-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.dashboard-card.bg-danger {
    --card-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Enhanced Glassmorphism Effects */
.dashboard-card.bg-primary .card-body,
.dashboard-card.bg-success .card-body,
.dashboard-card.bg-info .card-body,
.dashboard-card.bg-warning .card-body,
.dashboard-card.bg-danger .card-body {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

.dashboard-card:hover .card-body {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Pulsing Animation for Numbers */
@keyframes pulse-glow {
    0%, 100% { 
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% { 
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

.dashboard-card .card-title {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Shimmer Effect */
.dashboard-card::before {
    background: var(--card-gradient);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

/* Legacy Dashboard Card Support */
.dashboard-card.bg-primary .card-footer {
    background-color: rgba(13, 110, 253, 0.25) !important;
}

.dashboard-card.bg-success .card-footer {
    background-color: rgba(25, 135, 84, 0.25) !important;
}

.dashboard-card.bg-info .card-footer {
    background-color: rgba(13, 202, 240, 0.25) !important;
}

.dashboard-card.bg-warning .card-footer {
    background-color: rgba(255, 193, 7, 0.25) !important;
}

.dashboard-card.bg-danger .card-footer {
    background-color: rgba(220, 53, 69, 0.25) !important;
}

/* Wallet Styles */
.wallet-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.wallet-balance h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0;
}

.wallet-balance .currency {
    font-size: 1.2rem;
    opacity: 0.8;
}

.transaction-item {
    border-left: 4px solid transparent;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 0 8px 8px 0;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transaction-item.credit {
    border-left-color: var(--success-color);
}

.transaction-item.debit {
    border-left-color: var(--danger-color);
}

.transaction-amount.credit {
    color: var(--success-color);
}

.transaction-amount.debit {
    color: var(--danger-color);
}

/* Client Cards */
.client-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.client-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.client-card .card-header {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0 !important;
}

/* Team Badges */
.team-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
}

.team-badge:hover {
    color: white;
    opacity: 0.8;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.status-active {
    background-color: #d1edff;
    color: #0c63e4;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* Form Styles */
.form-floating > label {
    color: #6c757d;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(45deg, #0d6efd, #0b5ed7);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0b5ed7, #0a58ca);
    transform: translateY(-1px);
}

/* Table Styles */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 56px);
    padding: 2rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin: 0.25rem 1rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-card {
        border-radius: 16px;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem;
    }
    
    .dashboard-card .card-title {
        font-size: 2rem;
    }
    
    .dashboard-card .card-text {
        font-size: 0.9rem;
    }
    
    .dashboard-card .card-icon {
        font-size: 3rem;
        right: 1rem;
        top: 1rem;
    }
    
    .dashboard-card .card-footer {
        border-radius: 0 0 16px 16px;
    }
    
    .dashboard-card::after {
        background-size: 20px 20px;
    }
    
    .wallet-balance h2 {
        font-size: 2rem;
    }
    
    .client-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: 10px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .dashboard-card::after,
    .dashboard-card .card-icon,
    .dashboard-card .card-title {
        animation: none !important;
        transition: none !important;
    }
    
    .dashboard-card:hover {
        transform: none !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .pagination,
    footer {
        display: none !important;
    }
    
    .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        border-color: #404040;
    }
    
    .table {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .table thead th {
        background-color: #404040;
        color: #ffffff;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.1) !important;
}

.border-radius-lg {
    border-radius: 15px !important;
}

.border-radius-xl {
    border-radius: 20px !important;
}