/* Main Stylesheet for Inventory Management System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 30px;
    border-radius: 8px;
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Success/Error Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left-color: #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3436;
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3436;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #74b9ff;
    box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.1);
}

.form-control:invalid {
    border-color: #e17055;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    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;
}

.btn-primary {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #81ecec 0%, #00cec9 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #55efc4;
    color: #00b894;
}

.badge-warning {
    background: #fdcb6e;
    color: #e17055;
}

.badge-info {
    background: #81ecec;
    color: #00cec9;
}

.badge-primary {
    background: #74b9ff;
    color: #0984e3;
}

.badge-danger {
    background: #fd79a8;
    color: #e84393;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 5px solid;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.dashboard-card.orders { border-left-color: #74b9ff; }
.dashboard-card.products { border-left-color: #55efc4; }
.dashboard-card.customers { border-left-color: #fdcb6e; }
.dashboard-card.revenue { border-left-color: #fd79a8; }

.dashboard-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d3436;
}

.dashboard-card p {
    color: #636e72;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Section */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
}

/* Footer */
.main-footer {
    background: #2d3436;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-header {
        padding: 0.2rem 0;
    }
    
    .header-content {
        flex-wrap: wrap;
        min-height: 40px;
        gap: 0.3rem;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .logo img {
        height: 20px;
    }
    
    .nav-menu {
        gap: 0.3rem;
        flex: 1;
        justify-content: flex-end;
    }
    
    .nav-menu a {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .table-container {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0.1rem 0;
    }
    
    .logo h1 {
        font-size: 0.9rem;
    }
    
    .logo img {
        height: 18px;
    }
    
    .nav-menu {
        gap: 0.2rem;
    }
    
    .nav-menu a {
        padding: 3px 5px;
        font-size: 0.65rem;
    }
    
    .card {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .form-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .header-content {
        min-height: 35px;
    }
}

/* Mobile Navigation Improvements */
@media (max-width: 0px) {
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: right;
        max-width: 60%;
    }
    
    .nav-menu a {
        font-size: 0.7rem;
        padding: 3px 5px;
        margin: 1px;
        border-radius: 3px;
    }
    
    .logo {
        flex: 1;
        min-width: 0;
    }
    
    .logo h1 {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Success/Error Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #74b9ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}