/* Mobile Dashboard CSS - Vyapar Style Advanced App Design */

/* Mobile-only styles */
@media (max-width: 767px) {
    
    /* Clean white background */
    body {
        background: #ffffff !important;
        min-height: 100vh;
    }
    
    /* Page adjustments for mobile app style */
    .page-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }
    
    .page-content {
        padding: 15px 8px !important;
        background: #ffffff !important;
    }
    
    /* Mobile Quick Links Section */
    .mobile-quick-links {
        margin-bottom: 20px;
        padding: 0 5px;
    }
    
    .quick-links-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 15px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .quick-link-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .quick-link-item:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    
    .quick-link-item:active {
        transform: scale(0.95);
    }
    
    .quick-link-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
        position: relative;
        overflow: hidden;
    }
    
    .quick-link-icon i {
        font-size: 18px;
        color: white;
        z-index: 2;
        position: relative;
    }
    
    .quick-link-label {
        font-size: 0.7rem;
        font-weight: 600;
        color: #333;
        text-align: center;
        line-height: 1.1;
    }
    
    .quick-link-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        background: linear-gradient(135deg, #ff4757, #ff3742);
        color: white;
        font-size: 0.5rem;
        font-weight: 700;
        padding: 1px 4px;
        border-radius: 6px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
        animation: pulse 2s infinite;
    }
    
    /* Quick Link Icon Colors */
    .sale-icon {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
    
    .pos-icon {
        background: linear-gradient(135deg, #FF9800, #F57C00);
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    }
    
    .purchase-icon {
        background: linear-gradient(135deg, #2196F3, #1976D2);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    }
    
    .customer-icon {
        background: linear-gradient(135deg, #9C27B0, #7B1FA2);
        box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
    }
    
    .emi-icon {
        background: linear-gradient(135deg, #FF5722, #D84315);
        box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
    }
    
    .item-icon {
        background: linear-gradient(135deg, #607D8B, #455A64);
        box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
    }
    
    .report-icon {
        background: linear-gradient(135deg, #795548, #5D4037);
        box-shadow: 0 4px 12px rgba(121, 85, 72, 0.3);
    }
    
    .supplier-icon {
        background: linear-gradient(135deg, #E91E63, #C2185B);
        box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    }
    
    /* Advanced mobile dashboard cards - Clean white background style */
    .card {
        margin-bottom: 12px;
        border-radius: 16px !important;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.6s ease;
    }
    
    .card:hover::before {
        left: 100%;
    }
    
    .card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    /* Advanced card body styling - Vyapar app style */
    .card-body {
        padding: 12px 8px !important;
        position: relative;
        z-index: 2;
    }
    
    /* Premium text styling - business app look */
    .card h4 {
        font-size: 1.1rem !important;
        font-weight: 800;
        margin: 4px 0 !important;
        line-height: 1.2;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        background: linear-gradient(135deg, #333, #555);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .card p {
        font-size: 0.65rem !important;
        margin-bottom: 2px !important;
        line-height: 1.1;
        font-weight: 600;
        color: #666 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Premium widget icons - advanced styling */
    .widgets-icons-2 {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        position: relative;
        overflow: hidden;
    }
    
    .widgets-icons-2::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: shimmer 3s infinite;
    }
    
    @keyframes shimmer {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Premium card colors - Vyapar style gradients */
    .border-info {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border: none !important;
    }
    
    .border-info .card-body {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border-radius: 12px;
    }
    
    .border-success {
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
        border: none !important;
    }
    
    .border-success .card-body {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(69, 160, 73, 0.1) 100%);
        border-radius: 12px;
    }
    
    .border-danger {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
        border: none !important;
    }
    
    .border-danger .card-body {
        background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
        border-radius: 12px;
    }
    
    .border-warning {
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
        border: none !important;
    }
    
    .border-warning .card-body {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
        border-radius: 12px;
    }
    
    /* Mobile row spacing - very tight for 4 cards */
    .row {
        margin: 0 -2px !important;
    }
    
    .col {
        padding: 0 2px !important;
    }
    
    /* Premium chart cards - advanced Vyapar style */
    .card-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 16px 16px 0 0 !important;
        padding: 18px 20px;
        border: none !important;
        position: relative;
        overflow: hidden;
    }
    
    .card-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        animation: headerShine 4s infinite;
    }
    
    @keyframes headerShine {
        0% { left: -100%; }
        50% { left: 100%; }
        100% { left: 100%; }
    }
    
    .card-header h6 {
        color: white !important;
        font-weight: 700;
        margin: 0;
        font-size: 1rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 2;
    }
    
    /* Table mobile styling */
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th {
        background: rgba(102, 126, 234, 0.1);
        border: none;
        font-weight: 600;
        padding: 10px 6px;
        font-size: 0.75rem;
    }
    
    .table td {
        border: none;
        padding: 10px 6px;
        vertical-align: middle;
    }
    
    .table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .table tbody tr:hover {
        background: rgba(102, 126, 234, 0.05);
    }
    
    /* Mobile badge */
    .badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    /* List group mobile */
    .list-group-item {
        border: none !important;
        padding: 8px 15px;
        background: transparent !important;
        font-size: 0.8rem;
    }
    
    .list-group-item:hover {
        background: rgba(102, 126, 234, 0.05) !important;
    }
    
    /* Touch interactions */
    .card {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    /* Advanced mobile animations - Vyapar style */
    .card {
        animation: slideUpBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        opacity: 0;
        animation-fill-mode: forwards;
    }
    
    @keyframes slideUpBounce {
        0% {
            opacity: 0;
            transform: translateY(50px) scale(0.8);
        }
        60% {
            opacity: 0.8;
            transform: translateY(-10px) scale(1.05);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    /* Staggered premium animation */
    .row .col:nth-child(1) .card { animation-delay: 0.1s; }
    .row .col:nth-child(2) .card { animation-delay: 0.2s; }
    .row .col:nth-child(3) .card { animation-delay: 0.3s; }
    .row .col:nth-child(4) .card { animation-delay: 0.4s; }
    
    /* Floating animation for icons */
    .widgets-icons-2 {
        animation: float 3s ease-in-out infinite;
    }
    
    @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-3px); }
    }
    
    /* Pulse effect for important cards */
    .border-danger .widgets-icons-2 {
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }
    
    /* Mobile typography colors */
    h4.text-info { color: #17a2b8 !important; }
    h4.text-success { color: #28a745 !important; }
    h4.text-danger { color: #dc3545 !important; }
    h4.text-warning { color: #ffc107 !important; }
    
    /* Mobile section spacing */
    .row + .row {
        margin-top: 20px !important;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .page-content {
        padding: 8px !important;
    }
    
    .card-body {
        padding: 15px 12px !important;
    }
    
    .card h4 {
        font-size: 1.4rem !important;
    }
    
    .widgets-icons-2 {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
    }
}
