* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2d8e6e 0%, #1a5c45 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #ecf0f1, #dfe6e9);
    color: #2c3e50;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #27ae60;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.nav-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-tab.active {
    background: white;
    color: #2c3e50;
    border-bottom-color: #27ae60;
}

.nav-tab:hover {
    background: #e9ecef;
}

.tab-content {
    display: none;
    padding: 30px;
    min-height: 600px;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Tablet */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 18px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tab-content {
        padding: 15px;
        min-height: auto;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tab {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 0;
        flex: 1 1 auto;
        text-align: center;
    }

    .card {
        padding: 15px;
    }

    .card h3 {
        font-size: 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
        margin-right: 5px;
        margin-bottom: 5px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    #stock .card {
        flex-direction: column !important;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .header h1 {
        font-size: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .header-actions .btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .nav-tab {
        padding: 8px 6px;
        font-size: 11px;
        flex: 1 1 30%;
    }

    .tab-content {
        padding: 10px;
    }

    .card {
        padding: 12px;
    }

    .form-group input, .form-group select, .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .modal-content {
        padding: 15px;
        border-radius: 10px;
    }

    #stock > div:first-child {
        flex-direction: column !important;
    }
}
