/* Enhanced Dashboard Styles */

/* Global Dashboard Styles */
body {
    background: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.page-content {
    background: transparent;
}

/* Modern Page Header */
.page-heading {
    background: linear-gradient(135deg, #3d5a80 0%, #2c4a5e 50%, #1b313f 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgb(104 137 150 / 30%);
    position: relative;
    overflow: hidden;
}

.page-heading::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.page-heading h1 {
    color: white !important;
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.page-heading .btn-primary-alt {
    background: white !important;
    color: #11998e !important;
    border: none !important;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.page-heading .btn-primary-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa !important;
}

/* Enhanced Search Panel */
.panel {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
    background: white;
    margin-bottom: 30px;
}

.panel-heading {
    background: linear-gradient(135deg, #09243e 0%, #ffffff 100%) !important;
    color: #ffffff !important;
    padding: 20px 25px !important;
    border: none !important;
    font-weight: 600;
    font-size: 16px;
}

.panel-heading i {
    margin-right: 10px;
}

.panel-heading .badge {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.panel-body {
    padding: 25px;
}

/* Search Input Styling */
#serialSearch {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#serialSearch:focus {
    border-color: #11998e;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.1);
    outline: none;
}

.input-group-addon {
    background: #11998e !important;
    color: white !important;
    border: none !important;
    border-radius: 8px 0 0 8px;
}

.input-group-btn .btn {
    border-radius: 0 8px 8px 0;
    padding: 12px 20px;
}

/* Enhanced Table Styling */
.table {
    margin-bottom: 0;
}

.table thead {
    background: linear-gradient(135deg, #04446b 0%, #7e7e7e 100%) !important;
    color: white !important;
}

.table thead th {
    border: none !important;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: white !important;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table .btn-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.table .btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

/* Search Spinner */
.search-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top-color: #11998e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Modern Dashboard Card Styles */
.shortcut-card {
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 28px;
    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;
    text-decoration: none;
    color: #1f2d3d;
    overflow: hidden;
    border: 2px solid transparent;
    height: 100%;
    min-height: 200px;
}

.shortcut-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.shortcut-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(17, 153, 142, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.shortcut-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(17, 153, 142, 0.2);
    text-decoration: none;
    border-color: rgba(17, 153, 142, 0.3);
}

.shortcut-card:hover::after {
    opacity: 1;
}

.shortcut-card:hover::before {
    opacity: 1;
}

/* Color schemes - Light Green Theme */
.sc-purple::before { background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%); }
.sc-blue::before { background: linear-gradient(90deg, #0ba360 0%, #3cba92 100%); }
.sc-red::before { background: linear-gradient(90deg, #56ab2f 0%, #a8e063 100%); }
.sc-navy::before { background: linear-gradient(90deg, #134e5e 0%, #71b280 100%); }
.sc-green::before { background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%); }
.sc-orange::before { background: linear-gradient(90deg, #56ab2f 0%, #a8e063 100%); }

/* Header styling */
.shortcut-card .sc-header {
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.sc-purple .sc-header { color: #11998e; }
.sc-blue .sc-header { color: #0ba360; }
.sc-red .sc-header { color: #56ab2f; }
.sc-navy .sc-header { color: #134e5e; }
.sc-green .sc-header { color: #11998e; }
.sc-orange .sc-header { color: #56ab2f; }

.shortcut-card:hover .sc-header {
    opacity: 1;
    transform: translateX(5px);
}

/* Title styling */
.shortcut-card .sc-title {
    font-size: 22px;
    font-weight: 800;
    margin: 12px 0 8px 0;
    color: #2c3e50;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.shortcut-card:hover .sc-title {
    color: #1a252f;
}

/* Subtitle styling */
.shortcut-card .sc-sub {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

/* Icon styling */
.shortcut-card .sc-icon {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
}

.sc-purple .sc-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: white; }
.sc-blue .sc-icon { background: linear-gradient(135deg, #0ba360 0%, #3cba92 100%); color: white; }
.sc-red .sc-icon { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); color: white; }
.sc-navy .sc-icon { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%); color: white; }
.sc-green .sc-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: white; }
.sc-orange .sc-icon { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); color: white; }

.shortcut-card:hover .sc-icon {
    transform: rotate(15deg) scale(1.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Footer styling */
.shortcut-card .sc-footer {
    position: absolute;
    bottom: 24px;
    left: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    z-index: 2;
}

/* Badge styling */
.sc-badge {
    border-radius: 25px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s ease;
    color: white;
}

.sc-purple .sc-badge { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.sc-blue .sc-badge { background: linear-gradient(135deg, #0ba360 0%, #3cba92 100%); }
.sc-red .sc-badge { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); }
.sc-navy .sc-badge { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%); }
.sc-green .sc-badge { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.sc-orange .sc-badge { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%); }

.shortcut-card:hover .sc-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Button styling */
.shortcut-card .btn-open {
    font-size: 11px;
    padding: 8px 16px;
    border-radius: 20px;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sc-purple .btn-open { color: #11998e !important; }
.sc-blue .btn-open { color: #0ba360 !important; }
.sc-red .btn-open { color: #56ab2f !important; }
.sc-navy .btn-open { color: #134e5e !important; }
.sc-green .btn-open { color: #11998e !important; }
.sc-orange .btn-open { color: #56ab2f !important; }

.shortcut-card:hover .btn-open {
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sc-purple:hover .btn-open { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important; color: white !important; border-color: transparent !important; }
.sc-blue:hover .btn-open { background: linear-gradient(135deg, #0ba360 0%, #3cba92 100%) !important; color: white !important; border-color: transparent !important; }
.sc-red:hover .btn-open { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%) !important; color: white !important; border-color: transparent !important; }
.sc-navy:hover .btn-open { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%) !important; color: white !important; border-color: transparent !important; }
.sc-green:hover .btn-open { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important; color: white !important; border-color: transparent !important; }
.sc-orange:hover .btn-open { background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%) !important; color: white !important; border-color: transparent !important; }

/* Chart Boxes */
.chart-box {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.chart-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.chart-box h5 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 700;
    font-size: 18px;
    border-bottom: 3px solid #11998e;
    padding-bottom: 15px;
}

/* Section Titles */
.dashboard-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 40px 0 25px 0;
    padding-left: 20px;
    position: relative;
}

.dashboard-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 24px;
    background: linear-gradient(180deg, #11998e 0%, #38ef7d 100%);
    border-radius: 3px;
}

/* Success Message */
.alert-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

/* Animation for cards on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shortcut-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.shortcut-card:nth-child(1) { animation-delay: 0.1s; }
.shortcut-card:nth-child(2) { animation-delay: 0.2s; }
.shortcut-card:nth-child(3) { animation-delay: 0.3s; }
.shortcut-card:nth-child(4) { animation-delay: 0.4s; }
.shortcut-card:nth-child(5) { animation-delay: 0.5s; }
.shortcut-card:nth-child(6) { animation-delay: 0.6s; }
.shortcut-card:nth-child(7) { animation-delay: 0.7s; }
.shortcut-card:nth-child(8) { animation-delay: 0.8s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-heading {
        padding: 20px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .panel-body {
        padding: 15px;
    }

    .shortcut-card {
        margin-bottom: 20px;
        min-height: 180px;
    }
    
    .shortcut-card .sc-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}
