/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5f0 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #0E537F 0%, #088A4B 100%);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    border-radius: 0 0 15px 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.header-logo {
    margin-bottom: 1rem;
}

.logo {
    max-height: 80px;
    max-width: 250px;
    width: auto;
    height: auto;
    transition: filter 0.3s ease;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation */
.nav {
    margin-bottom: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
    display: inline-block;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Menu Styles */
.menu-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-card h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
}

.menu-description {
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.8;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.menu-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-item:hover:not(.disabled) {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(8, 138, 75, 0.15);
    border-color: #088A4B;
}

.menu-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.menu-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.menu-item h3 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.menu-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.menu-arrow {
    font-size: 1.5rem;
    color: #088A4B;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-item:hover:not(.disabled) .menu-arrow {
    opacity: 1;
}

.coming-soon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ffc107;
    color: #856404;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Reports Section */
.reports-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.back-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateX(-3px);
}

.section-header h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.report-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.report-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(8, 138, 75, 0.1);
    border-color: #088A4B;
}

.report-item .report-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.report-content {
    flex: 1;
}

.report-content h3 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.report-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Report Grid (Legacy - keeping for backward compatibility) */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.report-card {
    background: linear-gradient(135deg, #088A4B 0%, #5CB20A 100%);
    color: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

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

.report-card.disabled {
    background: linear-gradient(135deg, #0E537F 0%, #6b7280 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.report-card.disabled:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.report-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.report-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    line-height: 1.3;
}

.report-card p {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Forms */
.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #0E537F 0%, #088A4B 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 138, 75, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: auto;
}

.btn-disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.results-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

.results-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.results-table tr:last-child td {
    border-bottom: none;
}

/* Align total column to right */
.results-table td:last-child,
.results-table th:last-child {
    text-align: right;
}

/* Order links in tables */
.order-link {
    color: #088A4B;
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.order-link:hover {
    background: rgba(8, 138, 75, 0.1);
    color: #0E537F;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Order Detail Styles */
.order-header-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #088A4B;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* Status badges */
.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem !important;
    display: inline-block;
    width: fit-content;
    text-align: center;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-shipped {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Total amount highlighting */
.total-amount {
    font-weight: 700 !important;
    font-size: 1.3rem !important;
    color: #088A4B !important;
}

/* Loading container */
.loading-container {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #088A4B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

/* Error Section */
.error-card {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
}

.error-card h3 {
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .report-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 0.75rem;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-info {
        justify-content: space-between;
    }
    
    .results-table {
        font-size: 0.9rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Order detail responsive styles */
    .order-header-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-item {
        padding: 0.75rem;
    }
    
    .info-item label {
        font-size: 0.8rem;
    }
    
    .info-item span {
        font-size: 1rem;
    }
    
    .total-amount {
        font-size: 1.1rem !important;
    }
    
    .loading-container {
        padding: 2rem 1rem;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .report-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .report-card {
        padding: 1rem;
        min-height: 140px;
    }
    
    .report-icon {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
    }
    
    .report-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .report-card p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .results-table {
        font-size: 0.8rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
input:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .form-actions,
    .nav,
    #exportBtn {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Compact Reports Styles */
/* Search Container */
.search-container {
    position: relative;
    margin: 1.5rem 0;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #088A4B;
    box-shadow: 0 0 0 3px rgba(8, 138, 75, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
}

/* Compact Reports List */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-row {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.report-row:hover {
    border-color: #088A4B;
    box-shadow: 0 4px 12px rgba(8, 138, 75, 0.1);
    transform: translateY(-2px);
}

.report-row .report-icon {
    font-size: 1.8rem;
    width: 3rem;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
}

.report-row .report-description {
    flex: 1;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.3;
}

.btn-compact {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    min-width: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Mobile responsive for compact reports */
@media (max-width: 768px) {
    .search-input {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 0.8rem;
        font-size: 1rem;
    }
    
    .report-row {
        padding: 0.8rem;
        justify-content: center;
        gap: 1rem;
    }
    
    .report-row .report-icon {
        font-size: 1.5rem;
        width: 2.5rem;
    }
    
    .btn-compact {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}