﻿/* ====================================
   AdminKit Mobile-First Global Styles
   ==================================== */

/* Responsive Breakpoints */
@media (min-width: 992px) {
    .desktop-view {
        display: block;
    }

    .mobile-view {
        display: none;
    }
}

@media (max-width: 991px) {
    .desktop-view {
        display: none;
    }

    .mobile-view {
        display: block;
    }
}

/* ====================================
   MOBILE CARDS & LAYOUTS
   ==================================== */

.mobile-header {
    background: var(--bs-white);
    border-radius: var(--bs-border-radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--bs-box-shadow-sm);
}

.mobile-card {
    background: var(--bs-white);
    border-radius: var(--bs-border-radius-lg);
    padding: 1rem;
    margin-bottom: 12px;
    box-shadow: var(--bs-box-shadow-sm);
    border-left: 4px solid var(--bs-primary);
    transition: transform 0.2s ease;
}

    .mobile-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--bs-box-shadow);
    }

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.mobile-card-content {
    margin-bottom: 16px;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ====================================
   STATS BARS
   ==================================== */

.stats-bar {
    background: var(--bs-primary);
    color: var(--bs-white);
    padding: 15px 20px;
    border-radius: var(--bs-border-radius);
    margin-bottom: 20px;
}

.stat-item {
    padding: 8px;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

    .stat-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }

    .stat-item.active {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

@media (max-width: 991px) {
    .stats-bar {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
}

/* ====================================
   BUTTONS & ACTIONS
   ==================================== */

.btn-mobile {
    background: var(--bs-primary);
    color: var(--bs-white);
    border-radius: var(--bs-border-radius);
    padding: 8px 12px;
    border: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .btn-mobile:hover {
        background: color-mix(in srgb, var(--bs-primary) 90%, black);
        color: var(--bs-white);
    }

    .btn-mobile.btn-outline {
        background: transparent;
        color: var(--bs-primary);
        border: 1px solid var(--bs-primary);
    }

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

.action-btn-improved {
    min-width: 120px;
    padding: 12px 20px;
    border-radius: var(--bs-border-radius);
    font-weight: 600;
    transition: all 0.2s ease;
}

    .action-btn-improved:hover {
        transform: translateY(-2px);
        box-shadow: var(--bs-box-shadow);
    }

    .action-btn-improved .btn-text {
        display: block;
        font-size: 0.75rem;
        opacity: 0.9;
        margin-top: 2px;
    }

.btn-task-action {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: var(--bs-border-radius);
}

@media (max-width: 991px) {
    .action-btn-improved {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ====================================
   FAB (Floating Action Button)
   ==================================== */

.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

    .fab-main:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    }

.fab-options {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

    .fab-options.show {
        opacity: 1;
        transform: translateY(0);
    }

.fab-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .fab-option:hover {
        transform: scale(1.1);
    }

.fab-start {
    background: var(--bs-primary);
}

.fab-pause {
    background: var(--bs-warning);
}

.fab-complete {
    background: var(--bs-success);
}

.fab-cancel {
    background: var(--bs-danger);
}

/* ====================================
   PROGRESS INDICATORS
   ==================================== */

.task-progress {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

    .progress-step::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 50%;
        right: -50%;
        height: 2px;
        background: var(--bs-border-color);
        z-index: 1;
    }

    .progress-step:last-child::before {
        display: none;
    }

    .progress-step.active::before {
        background: var(--bs-primary);
    }

.progress-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bs-border-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
}

.progress-step.active .progress-step-circle {
    background: var(--bs-primary);
}

.progress-step.completed .progress-step-circle {
    background: var(--bs-success);
}

/* ====================================
   QUICK INFO & DISPLAYS
   ==================================== */

.quick-info-card {
    background: var(--bs-tertiary-bg);
    border-radius: var(--bs-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--bs-border-color);
}

    .info-row:last-child {
        border-bottom: none;
    }

.info-label {
    font-weight: 600;
    color: var(--bs-body-color);
    font-size: 0.875rem;
}

.info-value {
    color: var(--bs-secondary);
    font-size: 0.875rem;
    text-align: right;
    flex: 1;
    margin-left: 1rem;
}

.time-display {
    background: var(--bs-primary);
    color: white;
    border-radius: var(--bs-border-radius-pill);
    padding: 12px 20px;
    text-align: center;
    margin: 1rem 0;
}

.time-value {
    font-size: 1.25rem;
    font-weight: bold;
}

.time-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* ====================================
   BADGES & STATUS
   ==================================== */

.status-badge-large {
    padding: 8px 16px;
    border-radius: var(--bs-border-radius-pill);
    font-weight: 600;
    font-size: 0.875rem;
}

.status-badge {
    padding: 4px 8px;
    border-radius: var(--bs-border-radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-code-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 600;
}

    .order-code-link:hover {
        color: color-mix(in srgb, var(--bs-primary) 80%, black);
        text-decoration: underline;
    }

/* ====================================
   NAVIGATION & CONTROLS
   ==================================== */

.view-switcher-mobile {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
    background: var(--bs-tertiary-bg);
    padding: 4px;
    border-radius: var(--bs-border-radius-pill);
}

.view-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--bs-border-radius-pill);
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .view-btn.active {
        background: var(--bs-primary);
        color: white;
        box-shadow: var(--bs-box-shadow-sm);
    }

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-white);
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .nav-btn:hover {
        background: var(--bs-primary);
        color: white;
        border-color: var(--bs-primary);
    }

/* ====================================
   ENHANCED HEADERS
   ==================================== */

.card-header-improved {
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1.25rem;
}

.page-header {
    background: var(--bs-white);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--bs-box-shadow-sm);
}

.gradient-header {
    background: linear-gradient(135deg, var(--bs-primary) 0%, color-mix(in srgb, var(--bs-primary) 80%, black) 100%);
    color: white;
}

@media (max-width: 991px) {
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* ====================================
   LOADING & STATES
   ==================================== */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bs-border-radius);
}

/* ====================================
   ANIMATIONS
   ==================================== */

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0.3;
    }
}

.blink {
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* ====================================
   UTILITIES
   ==================================== */

.text-clickable {
    cursor: pointer;
    color: var(--bs-primary);
    text-decoration: underline;
}

    .text-clickable:hover {
        color: color-mix(in srgb, var(--bs-primary) 80%, black);
    }

.group-header {
    background: var(--bs-tertiary-bg);
    padding: 12px;
    border-radius: var(--bs-border-radius);
    margin: 16px 0 8px 0;
    border-left: 4px solid var(--bs-primary);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--bs-secondary);
}

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }
