/* 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: #f5f7fa;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(231, 76, 60, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(231, 76, 60, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.05) 0%, transparent 30%);
    z-index: -1;
    animation: bgAnimation 20s linear infinite;
}

@keyframes bgAnimation {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, 10px);
    }
    50% {
        transform: translate(0, 20px);
    }
    75% {
        transform: translate(-20px, 10px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Floating animation for cards */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Pulse animation for buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    width: 100%;
    padding: 15px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.dashboard-container {
    width: 100%;
    padding: 15px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    background: #fff;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    border: 1px solid #eef2f7;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #e74c3c;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.admin-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.admin-info a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.admin-info a:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Login container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}

/* Login form */
.login-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 100%;
    animation: float 3s ease-in-out infinite;
    border: 1px solid #eef2f7;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.btn:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.3);
}

.copy-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    background: #fff;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    animation: fadeIn 1s ease-out;
    border: 1px solid #eef2f7;
}

nav ul li {
    flex: 1;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: #f8f9fa;
    color: #e74c3c;
    transform: translateY(-2px);
}

/* Dashboard stats */
.dashboard-stats {
    margin-bottom: 30px;
}

.dashboard-stats h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    animation-delay: calc(var(--delay, 0) * 0.2s);
    border: 1px solid #eef2f7;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
    font-size: 1.1rem;
}

/* Recent orders */
.recent-orders {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: fadeIn 1.2s ease-out;
    border: 1px solid #eef2f7;
}

.recent-orders h2 {
    margin-bottom: 20px;
    color: #333;
}

.recent-orders table {
    width: 100%;
    border-collapse: collapse;
}

.recent-orders th,
.recent-orders td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #333;
}

.recent-orders th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Order form */
.order-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: fadeIn 1s ease-out;
    border: 1px solid #eef2f7;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Messages and errors */
.message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    animation: fadeIn 0.5s ease-out;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    animation: fadeIn 0.5s ease-out;
}

.change-code-section {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out;
    border: 1px solid #eef2f7;
}

.change-code-section h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.change-code-section .form-group {
    margin-bottom: 20px;
}

.change-code-section .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.change-code-section .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.change-code-section .form-group input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.change-code-section .btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.change-code-section .btn:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.3);
}

.status-message {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 20px;
    text-align: center;
    border-left: 5px solid #e74c3c;
    animation: fadeIn 0.8s ease-out;
    border: 1px solid #eef2f7;
}

.status-message.cancelled {
    border-left: 5px solid #e74c3c;
}

.status-message.return {
    border-left: 5px solid #f1c40f;
}

.status-message h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.status-message p {
    margin: 0;
    color: #666;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(200%);
    transition: transform 0.3s ease;
    border: 1px solid #fff;
}

.notification.show {
    transform: translateX(0);
}

/* Orders table */
.orders-table {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: fadeIn 1s ease-out;
    border: 1px solid #eef2f7;
}

.orders-table h2 {
    margin-bottom: 20px;
    color: #333;
}

.orders-table table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #333;
}

.orders-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.orders-table select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
}

.orders-table select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* Contact info */
.contact-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.contact-info p {
    font-size: 0.9rem;
    color: #666;
}

/* Tracking form */
.tracking-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    border: 1px solid #eef2f7;
}

.tracking-form h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Features section */
.features {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
    animation: fadeIn 1.5s ease-out;
    border: 1px solid #eef2f7;
}

.features h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    animation-delay: calc(var(--delay, 0) * 0.2s);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 15px;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    animation: pulse 2s infinite;
}

/* Vertical timeline */
.timeline {
    padding: 25px;
    border-top: 1px solid #eee;
    animation: fadeIn 1s ease-out;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    border: 1px solid #eef2f7;
}

.timeline h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.vertical-timeline {
    position: relative;
    padding-left: 40px;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 3px;
    background: #e74c3c;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -47px;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 2;
}

.timeline-item.completed .timeline-marker {
    background: #2ecc71;
    color: white;
}

.timeline-item.active .timeline-marker {
    background: #e74c3c;
    color: white;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.7);
    animation: pulse 1.5s infinite;
}

.timeline-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.timeline-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.timeline-content p {
    margin: 0;
    color: #666;
}

/* Order details */
.order-details {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 20px 0;
    animation: fadeIn 0.8s ease-out;
    border: 1px solid #eef2f7;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.order-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

.customer-info, .product-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.customer-info h3, .product-info h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3rem;
}

.customer-info p, .product-info p {
    margin-bottom: 10px;
    color: #666;
}

/* Status badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-order-confirmed {
    background: #fff3cd;
    color: #856404;
}

.status-picked {
    background: #cce5ff;
    color: #004085;
}

.status-dispatched {
    background: #d1ecf1;
    color: #0c5460;
}

.status-at-delivery-hub {
    background: #bee5eb;
    color: #0f6674;
}

.status-out-of-delivery {
    background: #b8daff;
    color: #004085;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-return {
    background: #fff3cd;
    color: #856404;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.back-link:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Responsive design */
/* Tablet and larger screens */
@media (min-width: 768px) {
    .container {
        max-width: 1200px;
        padding: 20px;
    }
    
    .dashboard-container {
        max-width: 1200px;
        padding: 20px;
    }
    
    header {
        padding: 30px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.2rem;
    }
    
    .admin-info {
        text-align: right;
    }
    
    .login-container {
        padding: 0;
    }
    
    .login-form {
        padding: 40px;
        max-width: 450px;
    }
    
    .login-form h2 {
        font-size: 1.8rem;
    }
    
    nav ul {
        flex-direction: row;
    }
    
    nav ul li a {
        padding: 20px 25px;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .stat-card {
        padding: 30px;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    .recent-orders {
        padding: 40px;
    }
    
    .recent-orders th,
    .recent-orders td {
        padding: 20px;
    }
    
    .order-form {
        padding: 40px;
    }
    
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .orders-table {
        padding: 40px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 20px;
    }
    
    .tracking-form {
        padding: 40px;
        margin-bottom: 30px;
    }
    
    .tracking-form h2 {
        font-size: 1.8rem;
    }
    
    .features {
        padding: 40px;
        margin-top: 30px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .feature-card {
        padding: 30px;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .order-header {
        padding: 30px;
    }
    
    .order-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 30px;
    }
    
    .customer-info, .product-info {
        padding: 30px;
    }
    
    .timeline {
        padding: 40px;
    }
    
    .vertical-timeline {
        padding-left: 50px;
    }
    
    .vertical-timeline::before {
        left: 30px;
    }
    
    .timeline-marker {
        left: -57px;
        width: 50px;
        height: 50px;
    }
    
    .timeline-content {
        padding: 30px;
    }
    
    .status-message {
        margin: 30px;
        padding: 30px;
    }
}